[python] rychlost python2.2 vs python2.3

Radim Kolar hsn na cybermail.net
Neděle Říjen 19 09:12:55 CEST 2003


Rychlost pythonu se opravdu ve vezi 2.3 zvysila. U mne tedy ne o
inzerovanych 30% ale priblizne o 20%. Pametova narocnost interpretru:

3156k python2.1
3376k python2.2
4352k python2.3 (porad velice hezky vysledek oproti Jave1.1 o novejsich
verzich ani nemluve)

Bohuzel se snizila startovaci rychlost interpretru a to na dvojnasobek
oproti 2.1/2.2, coz nepotesi ty co pisi v pythonu CGIcka (chtit
instalaci mod_python po webhostingu je opravdu prilis, to by museli umet
taky neco prelozit)

Asi to souvisi s tim, ze se pri startu pokousi lovit moduly vsude
mozne a produkuje tak znacne mnozstvi syscallu oproti starsim verzim.
Pokud pocitam spravne potrebuje 15 syscalu aby nasel jeden modul.
Pro zajimavost lov na modul atexit:

stat64("atexit", 0xbfffea00)            = -1 ENOENT (No such file or directory)
open("atexit.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("atexitmodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("atexit.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("atexit.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python23.zip/atexit", 0xbfffea00) = -1 ENOENT (No such file or directory)
open("/usr/lib/python23.zip/atexit.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/python23.zip/atexitmodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/python23.zip/atexit.py", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/python23.zip/atexit.pyc", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/python2.3/atexit", 0xbfffea00) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.3/atexit.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.3/atexitmodule.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.3/atexit.py", O_RDONLY|O_LARGEFILE) = 4
open("/usr/lib/python2.3/atexit.pyc", O_RDONLY|O_LARGEFILE) = 5



Další informace o konferenci Python