Why does Python code run faster in a function?
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 2
--
Chapters
00:00 Question
00:42 Accepted answer (Score 582)
01:55 Answer 2 (Score 698)
03:04 Answer 3 (Score 47)
07:05 Thank you
--
Full question
https://stackoverflow.com/questions/1124...
Accepted answer links:
[illustration]: https://wiki.python.org/moin/PythonSpeed...
Answer 2 links:
[STORE_FAST]: http://docs.python.org/library/dis.html#...
[STORE_NAME]: http://docs.python.org/library/dis.html#...
[dis]: http://docs.python.org/library/dis.html
[compile]: http://docs.python.org/library/functions...
Answer 3 links:
[ceval.c]: https://hg.python.org/cpython/file/45b1a...
[FOR_ITER]: https://hg.python.org/cpython/file/45b1a...
[Python wiki page]: https://wiki.python.org/moin/CPythonVmIn...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #performance #profiling #benchmarking #cpython
#avk47
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 2
--
Chapters
00:00 Question
00:42 Accepted answer (Score 582)
01:55 Answer 2 (Score 698)
03:04 Answer 3 (Score 47)
07:05 Thank you
--
Full question
https://stackoverflow.com/questions/1124...
Accepted answer links:
[illustration]: https://wiki.python.org/moin/PythonSpeed...
Answer 2 links:
[STORE_FAST]: http://docs.python.org/library/dis.html#...
[STORE_NAME]: http://docs.python.org/library/dis.html#...
[dis]: http://docs.python.org/library/dis.html
[compile]: http://docs.python.org/library/functions...
Answer 3 links:
[ceval.c]: https://hg.python.org/cpython/file/45b1a...
[FOR_ITER]: https://hg.python.org/cpython/file/45b1a...
[Python wiki page]: https://wiki.python.org/moin/CPythonVmIn...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #performance #profiling #benchmarking #cpython
#avk47