4 ms·
You understand this is mostly ruby using jemalloc and some other memory allocation tricks? Support for doing this in python was added in PEP-445 (https://www.p
by wokwokwok 5y ago
You understand this is mostly ruby using jemalloc and some other memory allocation tricks?
Support for doing this in python was added in PEP-445 (https://www.python.org/dev/peps/pep-0445/ https://www.python.org/dev/peps/pep-0445/) and implementation details can be found here from 2013 (https://bugs.python.org/issue3329 https://bugs.python.org/issue3329). For more info see: https://docs.python.org/3/c-api/memory.html https://docs.python.org/3/c-api/memory.html
You can see some commentary on using malloc-trim here too -> https://www.softwareatscale.dev/p/run-python-servers-more-efficiently https://www.softwareatscale.dev/p/run-python-servers-more-ef...
...long story short: basically, you can already, but it doesn't really make much difference for most workloads.
Or, if your question is, why doesn't python get optimisation love and become fast like the javascript runtimes?
dunno. I guess we just don't have any big FANG companies pouring money on that, because they don't have a use for a faster python. A faster python does not make numpy, tensorflow or pytorch run faster because those are not written in python.
So I guess, there's a lack of value-for-effort in trying to 'fix' the problem of 'pure' python being slow.
- jsmeaton 5y agoFYI Microsoft is funding Guido and a small team to specifically work on performance see https://m.slashdot.org/story/385526 https://m.slashdot.org/story/385526
- karlding 5y agoThis [0] is the announcement from the PSF. The team also includes core developers Eric Snow and Mark Shannon (of the faster-cpython [1] proposal). [0] https://pyfound.blogspot.com/2021/05/the-2021-python-language-summit-making.html https://pyfound.blogspot.com/2021/05/the-2021-python-languag... [1] https://github.com/markshannon/faster-cpython https://github.com/markshannon/faster-cpython