You know that if you really want to focus on performance, Python should
not be used in the first place... ;-)
Johnny
On 2024-06-25 02:39, Paul Koning wrote:
I was just reading about an alternate Python
implementation called PyPy, which uses a "just in time" compiler. With that
it's supposed to be potentially a lot faster than regular Python, for code that does a
fair amount of computation.
While PyDECnet does plenty of I/O, things like packet parsing are fairly time consuming.
I've optimized it a bit but the structure I adopted only allows for so much.
I tried PyPy to see if it supports PyDECnet. The answer is yes, after I removed some
code from two files that wasn't even used in the first place...
Just to see if it makes a big difference, I did a large loop test: "ncp loop nod 0
count 50000 len 400". On my Mac (ARM) laptop, that takes 6.3 seconds with Python
3.13, and 1.2 seconds with PyPy.
More testing is needed but this is interesting.
paul
_______________________________________________
HECnet mailing list -- hecnet(a)lists.dfupdate.se
To unsubscribe send an email to hecnet-leave(a)lists.dfupdate.se
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol