Re: Differences between pypy2 and 3 and cffi
Matti Picus <[email protected]> Wed, 16 Feb 2022 09:03:40 +0200
| Newsgroups | gmane.comp.python.pypy |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Feb 15, 2022 at 3:36 AM Ioannis Foufoulas <[email protected]> wrote: Hi, I have an embedded function: @ffi.def_extern() def toint(input,insize,result): for i in range(insize): x = ffi.string(input[i]) result[i] = float(x) if x else 0 return 1 It seems that this runs around 30-40% percent slower in PyPy3 than in 2. Input is a char** c array and result is a float c array. The difference is not in ffi.string If having `result[i] = 1 if x else 0` it runs same in both versions. Any ideas? _______________________________________________ pypy-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-dev > I converted this to an issue https://foss.heptapod.net/pypy/pypy/-/issues/3682 with some timings and analysis of what might be happening. Matti _______________________________________________ pypy-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-dev