Did some benchmarks of Python zipapp using my old SSD laptop.

zipapps have slightly slower startup time (~0.008-0.021 seconds in my case, but it'll differ per machine, and it depends on the size of the scripts of course). Splitting the script into more modules, while better for normal script files, is worse for zipapps, probably because zipapp prevents bytecode caching (though I'm not sure about that). Compressing the zipapp does have a small penalty, though slow IO might change that.


Also, the 1500th Fibonacci number is 21926181917556241406686103706309915958486962357677823319609567683411737103996154706784970805215687688521901419825115263702442945271943536926661440182594140777502197056285887176431805932352996517081429110551249721527408760372455849356040271478780238165116043293748873801451260758422788414440690362014196035679949001. I know this because I intentionally bloated a script by precomputing 1500 Fibonacci numbers and somehow the precomputed table got dumped out.

· · brutaldon · 1 · 0 · 4

(It might be off-by-one or off-by-two depending on where you consider the Fibonacci sequence starting. I used {0: 1, 1: 1}.

Show thread
Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.