Performance of Python code
- Dominant language
- Python
- Stars
- 14.8k
- Forks
- 1k
- Avg merge
- 20h 29m
- Merged PRs (30d)
- 19
Description
The current situation on performance is that,
- code that uses lots of C extensions is has between near native performance to a few times slower
- pure python code is more 5 to 10x times slower.
Figure obtained from the benchmarks run in the `benchmark` CI job.

(number are from Nov 2020, so results so might not be fully up to date).
It would be interesting to try to improve pure python code performance. Both by itself, and also because it would likely make package import faster for larger packages https://github.com/iodide-project/pyodide/issues/347#issuecomment-758006886
Two approaches to try,
- wait until https://github.com/iodide-project/pyodide/pull/1102 is merged and see if it helps
- try to remove `EMULATE_FUNCTION_POINTER_CASTS` which has known performance cost. It should not be necessary https://github.com/iodide-project/pyodide/pull/970#issuecomment-751548993 but would need more investigation https://github.com/iodide-project/pyodide/pull/970#issuecomment-751557961
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.