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
asmeurer has quit [Ping timeout: 264 seconds]
asmeurer___ is now known as asmeurer
demonimin has joined #pypy
demonimin has joined #pypy
demonimin has quit [Changing host]
asmeurer__ has joined #pypy
asmeurer has quit [Ping timeout: 268 seconds]
asmeurer__ is now known as asmeurer
asmeurer has quit [Quit: asmeurer]
mattip has quit [Ping timeout: 245 seconds]
<kenaan> wlav cppyy-packaging 935c38f271a8 /: merge default into cppyy-packaging
<kenaan> wlav default 53d95e0b1421 /pypy/module/_cppyy/: merge cppyy-packaging: fixes performance regression (see: https://bitbucket.org/wlav/cppyy/issues/34/class-member-fu...
asmeurer__ has joined #pypy
jcea has quit [Quit: jcea]
raynold has quit [Quit: Connection closed for inactivity]
mattip has joined #pypy
raynold has joined #pypy
adamholmberg has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
asmeurer__ has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
tbodt has quit [Client Quit]
tbodt has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmeurer__ has joined #pypy
<kenaan> wlav cppyy-packaging 883089c1c89e /pypy/module/_cppyy/interp_cppyy.py: enable fast ffi path for free/static functions
<kenaan> wlav default 544d787e095e /pypy/module/_cppyy/interp_cppyy.py: enable fast ffi path for free / static functions
tayfun26 has joined #pypy
mattip has quit [Ping timeout: 240 seconds]
asmeurer__ has quit [Quit: asmeurer__]
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 255 seconds]
inad922 has joined #pypy
WATCHER100 has joined #pypy
antocuni has joined #pypy
dddddd has joined #pypy
lritter has joined #pypy
wleslie has joined #pypy
jsza has quit []
jsza has joined #pypy
DIRT has quit [Quit: Leaving]
inad922 has quit [Ping timeout: 260 seconds]
WATCHER100 has quit [Read error: Connection reset by peer]
WATCHER100 has joined #pypy
WATCHER100 has quit [Ping timeout: 264 seconds]
WATCHER100 has joined #pypy
wleslie has quit [Quit: ~~~ Crash in JIT!]
WATCHER100 has quit [Ping timeout: 256 seconds]
WATCHER100 has joined #pypy
MarkMangoba has quit []
MarkMangoba has joined #pypy
antocuni has quit [Ping timeout: 248 seconds]
WATCHER100 has quit [Remote host closed the connection]
WATCHER100 has joined #pypy
WATCHER100 has quit [Remote host closed the connection]
WATCHER100 has joined #pypy
Taggnostr is now known as Taggnostr2
Kronuz has quit [Ping timeout: 240 seconds]
Kronuz has joined #pypy
marky1991 has joined #pypy
jcea has joined #pypy
jcea has quit [Quit: jcea]
jcea has joined #pypy
inhahe_ has joined #pypy
inhahe has quit [Ping timeout: 245 seconds]
inad922 has joined #pypy
inad922 has quit [Ping timeout: 260 seconds]
inad922 has joined #pypy
Rhy0lite has joined #pypy
antocuni has joined #pypy
WATCHER100 has quit [Ping timeout: 245 seconds]
WATCHER100 has joined #pypy
WATCHER100 has quit [Ping timeout: 260 seconds]
raynold has quit [Quit: Connection closed for inactivity]
inad922 has quit [Ping timeout: 256 seconds]
inad922 has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
stevenja_ has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
inad922 has quit [Ping timeout: 264 seconds]
inad922 has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
tbodt has joined #pypy
tayfun26 has quit [Read error: Connection reset by peer]
DIRT has joined #pypy
mattip has joined #pypy
<arigato> >>> pow(123, 2000, int(2**31 * 1.4))
<arigato> 731654337L
<arigato> >>> pow(123, 2000, int(2**31 * 1.5))
<arigato> 2217363105
<arigato> >>> pow(123, 2000, int(2**31 * 1.52))
<arigato> 727979561
<cfbolz> wat
<arigato> so far pypy manages to reproduce the int-or-long strangeness results
<arigato> which I can explain :-)
<arigato> but I'd like to know if "returning more systematically an int" would be considered a CPython incompatibility
<cfbolz> arigato: that's specifically a pow-with-three-args problem, right?
<arigato> yes
<cfbolz> I'd say we should be fine returning more ints
<cfbolz> arigato: what's the pattern?
<arigato> it's done with a series of multiplications and modulo-reductions
<arigato> so it overflows randomly depending on internal details
<arigato> that's more visible if the 3rd arg is just a bit above 32 bits
<cfbolz> right
<arigato> because a multiplication of two numbers smaller than the 3rg arg is likley to fit inside the maximum 63 bits
<arigato> but of course that's random
<cfbolz> yes, I see
<cfbolz> arigato: so you'd instead check whether the end result fits?
<cfbolz> or reduce again even in the middle of the multiplications?
<arigato> it *always* dits
<arigato> it *always* fits
<cfbolz> ah, of course :-)
<arigato> there's a corner case with the 3rd arg being == -sys.maxint-1
<arigato> the result fits anyway, like "a % b" with b == -sys.maxint-1, but "a % b" also gives up and returns a long
<cfbolz> arigato: then I guess it might even make pow a tiny bit faster to not go to the long version in these cases
<arigato> ...ok what, no
<arigato> cfbolz: yes, I hope it will be quite a bit faster
<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 b717d811eb2b /pypy/module/_cppyy/: merge heads
<kenaan> arigo py3.5 8c7fd9e901c7 /pypy/module/_cppyy/: hg merge default
<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...
<kenaan> arigo py3.5 4db575509642 /: hg merge default
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cfbolz> arigato: yes, I've thought about the speed of warnings too recently
<cfbolz> Particularly since they don't have the equivalent optimization of oefmt
<arigato> oh, they are incredibly slower than that
<arigato> it's pages and pages of RPython code
mattip has joined #pypy
<arigato> doing things like looking up dictionaries left and right
<arigato> and calling getframe()
<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]
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 260 seconds]
asmeurer__ has quit [Quit: asmeurer__]
stevenja_ has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
marky1991 has joined #pypy
stevenja_ has quit [Remote host closed the connection]
asmeurer has joined #pypy
tbodt has quit [Quit: Textual IRC Client: www.textualapp.com]
tbodt_ has joined #pypy
tbodt_ has quit [Quit: ZNC 1.6.5+deb2build2 - http://znc.in]
tbodt has joined #pypy
DIRT has quit [Ping timeout: 260 seconds]
nunatak has quit [Ping timeout: 264 seconds]
nunatak has joined #pypy
DIRT has joined #pypy
nopf has joined #pypy
asmeurer has quit [Quit: asmeurer]
lritter has quit [Ping timeout: 256 seconds]
marky1991 has quit [Read error: Connection reset by peer]
asmeurer_ has joined #pypy
nimaje has quit [Read error: Connection reset by peer]
Arfrever has joined #pypy
nimaje has joined #pypy
raynold has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 248 seconds]
adamholmberg has joined #pypy
mattip has quit [Ping timeout: 260 seconds]