Hacker News new | ask | show | jobs
by megaman821 5497 days ago
The optimized version of the PyPY code is around 17x faster than the first version of the Python code. That makes your C++ code 8x faster than the PyPy code, but I consider any Python code within an order of magnitude of C++ good.
1 comments

140x speedup was compared to optimized python version. I've tried it vs. pypy now (version 1.5) - it is 20x faster.
Would it be possible for you to try ShedSkin on it?
I managed to compile the program using shedskin, but it throws a runtime error after it finds the first solution:

    ==== solution 1 =====
    (0, 2, 5, 7, 9, 4, 8, 1, 3, 6)
    terminate called after throwing an instance of '__shedskin__::TypeError*'
    Aborted
Ah, that's too bad... Thanks for the effort, anyway.