cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
jacob22_ has joined #pypy
jacob22 has quit [Read error: Connection reset by peer]
xcm has quit [Read error: Connection reset by peer]
xcm has joined #pypy
speeder39_ has quit [Quit: Connection closed for inactivity]
lritter has quit [Ping timeout: 265 seconds]
lritter has joined #pypy
alexge50 has quit [Read error: Connection reset by peer]
alexge50 has joined #pypy
alexge50 has quit [Read error: Connection reset by peer]
alexge50 has joined #pypy
alexge50 has quit [Read error: Connection reset by peer]
dddddd has quit [Remote host closed the connection]
ajlawrence has quit [Ping timeout: 260 seconds]
xcm has quit [Read error: Connection reset by peer]
xcm has joined #pypy
jvesely has quit [Quit: jvesely]
kingsley has quit [Remote host closed the connection]
<tumbleweed> nope, gcc 8 makes no difference, trying a translation with the pre-built pypy
<mattip> :(
lritter has quit [Quit: Leaving]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
antocuni has joined #pypy
xcm is now known as Guest13087
Guest13087 has quit [Killed (niven.freenode.net (Nickname regained by services))]
xcm has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
<tumbleweed> mattip: yep, it translates correctly on your pre-built pypy, but not on cpython
<cfbolz> tumbleweed: ouch
antocuni has quit [Ping timeout: 246 seconds]
i9zO5AP has joined #pypy
Ai9zO5AP has quit [Ping timeout: 245 seconds]
_whitelogger has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
Guest60861 has joined #pypy
Guest60861 has quit [Ping timeout: 240 seconds]
tos9 has quit [Ping timeout: 246 seconds]
tos9_ has joined #pypy
tos9_ is now known as tos9
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
mvantellingen has joined #pypy
dddddd has joined #pypy
<mattip> any thoughts on why dropping "(rffi.cast(lltype.Signed, addr_in) & 7) == 0"
<mattip> removes the "Exception: 'no_collect' function can trigger collection" error from _siphash24 on aarch64?
<mattip> see the _siphash24-collecting branch, which translates, vs. py3.6 which does not (on the buildbot)
Rhy0lite has joined #pypy
<cfbolz> mattip: no, it does not make any sense to me at all
jcea has joined #pypy
<cfbolz> mattip: maybe we should try to explicitly write a test that shows the problem somehow (translating just the siphash function that breaks?)
<mattip> yeah, makes sense
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
jvesely has joined #pypy
Dejan has joined #pypy
edd[m] has quit [Write error: Connection reset by peer]
agates[m] has quit [Write error: Connection reset by peer]
bendlas has quit [Read error: Connection reset by peer]
antocuni has joined #pypy
alexge50 has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
BPL has joined #pypy
<mattip> the statement "Assigning to __builtins__ has no effect" on https://doc.pypy.org/en/latest/cpython_differences.html#miscellaneous seems to have holes.
<mattip> on py3.6, if I do "__builtins__.min = 'abc'" the interpreter crashes
<mattip> when calling min in lib_pypy/pyrepl/unix_console.py
gracinet has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
bendlas has joined #pypy
<cfbolz> mattip: I need to look, iirc this a CPython 2 only feature anyway
<cfbolz> The assignment would look like this: __builtins__ = {some dict }
<mattip> ahh, so overriding the dictionary is forbidden but changing it is not
<mattip> this came up cuz I was trying to respond to a mail on python-ideas, so not really important
Guest60861 has joined #pypy
Guest60861 has quit [Client Quit]
antocuni has quit [Ping timeout: 252 seconds]
edd[m] has joined #pypy
agates[m] has joined #pypy
Ai9zO5AP has joined #pypy
i9zO5AP has quit [Ping timeout: 265 seconds]
<cfbolz> mattip: we should maybe still clarify the docs, if it's a 2 only concern
gracinet has left #pypy [#pypy]
<arigato> cfbolz: note that exec("", d) still puts a key '__builtins__' in d
<arigato> on python 3
<arigato> I think that the statement still makes sense then
kingsley has joined #pypy
<arigato> what the statement tries to say is that if you say __builtins__={...}, then it doesn't mean that the new dictionary will be used as builtins for the code running in this context
<arigato> in pypy as far as I remember the builtins dictionary actually used is always the same one
<kingsley> I bench marked floating point multiplications.
<kingsley> On my ol' AMD Athlon computer, pypy3 became faster than python2 and python3 when at least 32768 multiplications were done in each batch.
<kingsley> A colorful chart of my results is at
<kingsley> The bench marking code is at
<kingsley> I'd be happy to receive reports of its results on other peoples' computers.
<kingsley> Ideally when run with python2, python3 and pypy3.
<arigato> kingsley: that's really a benchmark of a lot of things but not really float multiplication. The actual operation turns into one machine instruction, the same as C would use. That's really hard to measure meaningfully, but you still get interesting results along the lines of "how long does it take for the JIT to wake up and compile a simple piece of code"
<kingsley> Another interesting result was that pypy3 was evidently about 80X faster.
<arigato> (note that if you do a float multiplication but don't use the result, it's likely that the machine instruction is actually not emitted, too, but again it's hard to measure just one instruction on modern CPUs)
<kingsley> arigato: Is there any chance you'd be willing to run my bench mark with various versions of python on your computer, and relay the results, along with the performance specs of your hardware?
<arigato> sorry, I'm trying to explain why I don't believe you're really doing something interesting here
<kenaan> rlamy py3.6-asyncgen 43827ffdbe61 /pypy/interpreter/: Remove unused argument in_generator from execute_frame()
Rhy0lite has quit [Quit: Leaving]
<energizer> arigato: if kingsley changed it to `x = n * 1.2345;; return x` would that be more informative?
<energizer> or probably return max(1.2 * i for i in range(N))
<arigato> (1) no, the JIT inlines functions; (2) that would add a lot of operations that take far longer to run than a mere CPU multiplication
<energizer> kingsley: the suggestion is to change the benchmark so that it is more informative
<arigato> float multiplication is an extreme example: you could try to benchmark it by writing C code---at least you have a better idea of what you're really testing, but it is still a hard exercice
<arigato> the point in pypy is that any float multiply turns into just one CPU instruction after a lot of JIT-compiling takes place
xcm has quit [Remote host closed the connection]
<energizer> is there a threshold for when jitting kicks in, on number of iterations over a certain code path?
xcm has joined #pypy
<kingsley> energizer: Maybe the threshold is about 32768 multiplications.
agronholm has quit [Ping timeout: 248 seconds]
agronholm has joined #pypy
<kenaan> mattip default 42337a484364 /pypy/doc/: add jit help to documentation
<kenaan> mattip default 96a1c0a30e47 /pypy/doc/: clean up "make html" warnings, remove a few blank whatsnew files
CrazyPython has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
<cfbolz> my draft of the json blog post is here, will post tomorrow
<mattip> energizer: the options around the JIT can be found here https://doc.pypy.org/en/latest/jit_help.html
<mattip> and more information about what that all means is here https://rpython.readthedocs.io/en/latest/jit/pyjitpl5.html
<mattip> it might have been hard to find the information previously since I just now created that page via "pypy --jit help > jit_help.rst"
<energizer> mattip: perfect, thanks
CrazyPython has quit [Ping timeout: 240 seconds]
lritter has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
xcm has quit [Read error: Connection reset by peer]
xcm has joined #pypy
<mattip> I added a test to the _siphash24-collecting branch that has enough of the function to trigger the "can trigger collection" error
ssbr` has joined #pypy
ssbr` has quit [Quit: Leaving]
ssbr` has joined #pypy
antocuni has joined #pypy
<kenaan> mattip _siphash24-collecting 158a54d11ca5 /rpython/memory/gctransform/test/test_framework.py: simplify test but it still passes (it should fail...)
<mattip> it seems some combination of bit-twiddling and an inline function confuses the no_collect check
<mattip> the CollectAnalyzer finds that the inlined function allocates a tuple4 for the return value, even though it is inlined?
<mattip> CollectAnalyzer] v55 = malloc((GcStruct tuple4), ({'flavor': 'gc'})): True
<mattip> [CollectAnalyzer] analyze_direct_call((rpython.memory.gctransform.test.test_framework:157)_double_round): True
CrazyPython has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
xcm has quit [Read error: Connection reset by peer]
CrazyPython has quit [Read error: Connection reset by peer]
xcm has joined #pypy
antocuni has quit [Ping timeout: 240 seconds]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy