Re:N-Queen Problem: Python 2.6.5 vs PyPy 1.5.0
by megaman821 on Sunday May 29, 2011 @05:33PM
(#2597661)
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.
[ Parent
| on HN ]
140x speedup was compared to optimized python version. I've tried it vs. pypy now (version 1.5) - it is 20x faster.
Re:N-Queen Problem: Python 2.6.5 vs PyPy 1.5.0
by StavrosK on Sunday May 29, 2011 @06:21PM
(#2597775)
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