cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | the secret reason for us trying to get PyPy users: to test the JIT well enough that we're somewhat confident about it
<cfbolz>
arigato: did you find it in a concrete program?
<cfbolz>
ouch
<arigato>
yes, the stdlib fractions.py
<cfbolz>
annoying
<arigato>
aaah ok, the overflowing case is (-sys.maxint-1) % -1, which returns 0L
inad922 has quit [Ping timeout: 240 seconds]
mattip has quit [Ping timeout: 240 seconds]
<arigato>
something else we might do at some point: look at the performance of warnings.warn()
<arigato>
maybe that would imply a user-triggered hack to easily turn them off
<arigato>
right now, even warnings that are ultimately ignored still need to be processed and the result stored in some globals
DIRT has quit [Remote host closed the connection]
<arigato>
ok that's a 33% win
<arigato>
so pypy3 should be 2x slower than pypy2 instead of 3x...
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arigato>
except 7160ef7f4d63 just gave a 2x speed boost to pypy2
tbodt has joined #pypy
<arigato>
that's theoretical so far, because pypy3 doesn't build (annotation error in cppyy)
<kenaan>
arigo default 7160ef7f4d63 /lib-python/2.7/fractions.py: Good speed boost on Fraction.__hash__(). Not compatible with Python 3, needs a different hack.
<kenaan>
arigo default 93f86b23bc8e /: Add rarithmetic.mulmod(). Use it to improve the performance of pow(a, b, c) if c is a large integer that still f...
<arigato>
(which either works or explodes the JIT, depending on the depth)
antocuni has quit [Ping timeout: 264 seconds]
Taggnostr3 has joined #pypy
tbodt has joined #pypy
Taggnostr2 has quit [Ping timeout: 248 seconds]
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
<cfbolz>
arigato: ouch ouch ouch
<cfbolz>
And then in a lot of cases they are just ignored
<arigato>
yes
<arigato>
I wonder if we shouldn't just ignore calls to warnings.warn() from jitted code
<arigato>
that's wrong of course
<arigato>
but maybe we should do it anyway, optionally, with the default of that option being debated
<kenaan>
arigo py3.5 06970e67d972 /lib-python/3/fractions.py: Cache the pow() result for small values up to 1000. This is enough to recover the original pypy2 speed on #2854.
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Taggnostr2 has joined #pypy
Taggnostr3 has quit [Ping timeout: 245 seconds]
tbodt has joined #pypy
tbodt has quit [Ping timeout: 248 seconds]
marky1991 has quit [Read error: Connection reset by peer]
asmeurer__ has joined #pypy
marky1991 has joined #pypy
<cfbolz>
arigato: well, or we try a bit whether it can be improved
<arigato>
yes, but that might be hard, because it really needs to have carefully constructed data showing up in dicts stored in globals
<cfbolz>
Right :-(
<cfbolz>
arigato: is it worth documenting the pow giving more ints thing in CPython differences?
<arigato>
that's unclear, I think all CPython code should be ready to receive ints or longs randomly
<cfbolz>
arigato: OK, and I vaguely recall that we already have a few obscure corner cases where we give more ints already
<mattip>
hi. Looking at the fraction hashing code, I think it might be buggy for denom < 0
<mattip>
ahh, nvrmind
<arigato>
cfbolz: yes, or the reverse, I think that struct.unpack() would return half ints half longs with some arguments and instead we always return longs
<cfbolz>
arigato: ok
<arigato>
mattip: yes, denom should always be >= 0
<cfbolz>
arigato: maybe we should write a catchall sentence about ints and longs into cpython-differences anyway
<arigato>
yes, agreed
<kenaan>
arigo py3.5 bc77e35508e9 /pypy/module/_cppyy/interp_cppyy.py: Fix py3.5 translation of the _cppyy module
tbodt has joined #pypy
Rhy0lite has quit [Quit: Leaving]
DIRT has joined #pypy
nunatak has joined #pypy
stevenja_ has quit [Remote host closed the connection]