News for hackers. Stuff that matters.
Re:Show HN: ZFS Implementation in Python by int_19h on Sunday May 05, 2019 @09:04PM (#19836112)
I had a binary parser written in Python that took around 30 seconds on typical input on CPython. PyPy took that down to about 10 seconds. Rewriting it in C# took it down to 200 ms.
Re:Show HN: ZFS Implementation in Python by twa927 on Monday May 06, 2019 @04:08AM (#19837627)
If this was using a loop processing a single byte in an iteration I would expect a greater speedup on PyPy. I've seen 100x speedup in such cases.
Re:Show HN: ZFS Implementation in Python by int_19h on Tuesday May 07, 2019 @12:26AM (#19846576)
Not single byte, but individual fields (float32/int32/string etc). Yes, I expected a much more significant speed-up as well. It's probably because a lot of that code was driven by reflection-type techniques.

Curiously, IronPython did better than anything (but still slow). Haven't tried Jython.

Compiling the whole thing with Cython was less effective than PyPy.

Re:Show HN: ZFS Implementation in Python by twa927 on Thursday May 09, 2019 @08:15AM (#19867516)
Yes, reflection voids many JIT paths in PyPy, AFAIK. Maybe it was worth rewriting the Python code to get rid of the reflection?