[pypy-dev] Pidigits performance without FFI

Maciej Fijalkowski fijall at gmail.com
Mon Aug 25 15:49:17 CEST 2014


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 at wilfred.me.uk> wrote:
> 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
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>


More information about the pypy-dev mailing list