Pidigits performance without FFI

Hi folks I've been looking at the pidigits benchmark from the Computer Language Benchmarks, but measuring performance without FFI (so native Python numbers instead of GMP). You can see my results here: https://github.com/Wilfred/the_end_times#preliminary-results I'm seeing better performance for CPython than pypy3 on simple arithmetic code. Is this to be expected? Could I make pypy3 perform better? Wilfred

pidigits is based on long numbers. We can make pypy be the same speed as cpython (porting missing optimizations), but not faster, or at least unlikely. Since the time is spent in runtime, the JIT does not help at all. We tried to used GMP, but we found out that GMP semantics are not really suitable for Python - notably there is no way to recover from an out-of-memory error (I think your program crashes as a result in GMP). On Mon, Aug 25, 2014 at 3:32 PM, Wilfred Hughes <me@wilfred.me.uk> wrote:

pidigits is based on long numbers. We can make pypy be the same speed as cpython (porting missing optimizations), but not faster, or at least unlikely. Since the time is spent in runtime, the JIT does not help at all. We tried to used GMP, but we found out that GMP semantics are not really suitable for Python - notably there is no way to recover from an out-of-memory error (I think your program crashes as a result in GMP). On Mon, Aug 25, 2014 at 3:32 PM, Wilfred Hughes <me@wilfred.me.uk> wrote:
participants (2)
-
Maciej Fijalkowski
-
Wilfred Hughes