pyodide / pyodide/pyodide

Performance of Python code

Open
#1,120 1 comment 7 reactions 0 assignees View on GitHub
performance roadmap
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.
![image](https://user-images.githubusercontent.com/630936/104234787-41089680-5454-11eb-8948-df2212fa3503.png)
(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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.