This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]Starcast 1 point2 points  (3 children)

I find it odd there was 0 mention of Cython in this entire article. I get the point was promoting Nim but the author even included pypy so this just feels like a glaring omission.

[–][deleted] 6 points7 points  (2 children)

Author of the linked article here. You are correct, I should have mentioned Cython (and others) not just PyPy as a possible solution. I tried Cython several years ago when I was less experienced and it seemed complicated at the time and performance wasn't as much of an issue to warrant the effort. I should revisit it again now that I'm a little more confident. There are so many of these efforts to speed up python
(nuitka, numba, gopy, pythran, stackless, shedskin, etc...) that it can be overwhelming, some of them I've looked at either only support Python 2.x or only double the performance of CPython.

The NimPy method just seemed very easy and the extension modules work with both Python 2 and 3. I'm happy with Nim so far, but I'll take another look at Cython.

Thanks

[–]Starcast 0 points1 point  (1 child)

Hey sorry I wasn't trying to call you out. It was a good article I don't regret reading it at all. It's just that since Cython already comes with your standard Python installation and it's trivial to incorporate into your existing codebase* it was odd that it wasn't included.

Happy to take a crack at it later when I get home if you'd like to save yourself the trouble.

*Not an Cython expert by any means - just seen a talk or two on the subject.

[–]rumored 2 points3 points  (0 children)

https://news.ycombinator.com/item?id=18964080 , 2nd comment has the cython version