pikasTech / PikaPython

An ultra-lightweight Python interpreter that runs with only 4KB of RAM, zero dependencies. It is ready to use out of the box without any configuration required and easy to extend with C. Similar project: MicroPython, JerryScript.
http://pikapython.com/
MIT License
1.47k stars 134 forks source link

执行效率问题 #273

Closed mka982 closed 1 year ago

mka982 commented 1 year ago

粗略地看了一下 基本上是通过字符串来关联对像 char pin = obj_getStr(self, "pin"); GPIO_TypeDef GPIO_group = get_GPIO_group(pin); uint16_t GPIO_pin = get_GPIO_pin(pin);

pikasTech commented 1 year ago
  1. 这部分是设备驱动层,脚本内核是哈希索引
  2. 原则上不会受理代码 review 过程中发现的 “优化点”,因为在实际运行中,这部分不一定构成瓶颈。
  3. 如果在实际运行中发现性能瓶颈,会考虑安排优化的计划。