-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embedded interpreter is 10% slower #270
Comments
Just tried reproing this. That's super weird -- it should be identical performance wise since we just statically link against libpython.a
|
This seems to be related to some of the compiler flags we set when building -- I'm investigating further |
Python installed via pyenv seems to be much slower than the native version that's installed on Arch Linux
same python version |
Even weirder, on my Mac I found exactly the opposite: ➜ /tmp sudo nice -n -20 /usr/local/bin/python3.10 echo.py (tmp) ➜ /tmp sudo nice -n -20 ~/miniconda3/envs/tmp/bin/python3.10 echo.py |
There seems to be a lot of special sauce that goes into tuning the python compilation. Conda seems to be more consistent than pyenv. My Arch Linux native Python works better than pyenv Likely can play with the compilation for libpython.a somewhat to get this to be more performant. Unfortunately deploy requires We're doing some experimentation with dynamo which could help alleviate python overhead |
Playing around with multipy, I found same program executed obviously slower in embedded interpreter. The original code is
echo.py
:The cost is around 40 when executed by system python. It remains the same when bytecode generation(
.pyc
and__pycache__
files) is disabled.It is packaged by:
and executed by multipy as follows:
which prints out:
why is it 10% slower?
The text was updated successfully, but these errors were encountered: