cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake https://pypy.org | IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end and https://libera.irclog.whitequark.org/pypy | the pypy angle is to shrug and copy the implementation of CPython as closely as possible, and staying out of design decisions
jcea has quit [Quit: jcea]
jcea has joined #pypy
jcea has quit [Ping timeout: 240 seconds]
rwb has quit [Ping timeout: 246 seconds]
rwb has joined #pypy
jcea has joined #pypy
<cfbolz> Guest60: you should run your benchmarks for a bit longer I think. eg on my laptop 15% of time in your gcd thing is the JIT compiling code
Guest60 has joined #pypy
<Guest60> cfbolz: yes, I had been keeping the reps low so I could use pypy to check that I hadn't been breaking anything obvious during development, but going forward I think I'll bump the defaults and add a command line option for number of reps. (already the repetitions are too high to usefully cross-check with cpython)
<Guest60> on the 15% however: it makes sense that when the JIT sees (A|B)*, it'll see one branch as hot first (generating A;A*) but I'm not sure why when it finds that the second branch is also hot it doesn't directly go to (A|B)*, but it takes several rounds of JIT invocation before the loop we ultimately want is finally synthesised.
<Guest60> I guess because of the virtualisables it takes a while to notice the branches are compatible enough to put in the same loop?
<Guest60> 1. (A_v;A;A*) where A_v is virtualising A
<Guest60> 2. (A_v;A;(A*|B_v;B;(not.A;B)*))
<Guest60> 3. (A_v;A;(A*|B_v;B;((not.A;B)*|A;A*)))
<Guest60> 4. something yet more complex, but still, after initial branching, looping only for runs of a single condition
<Guest60> 5. finally generates (at the bottom of the tree) (int_lt(i34,i58);i_sub(i58;i34)|int_lt(i58;i34);i_sub(i34,i58))* QEF
Guest60 has quit [Quit: Client closed]
jcea has quit [Ping timeout: 246 seconds]
Guest60 has joined #pypy
Guest60 has quit [Quit: Client closed]
Guest60 has joined #pypy
Guest60 has quit [Quit: Client closed]
Guest60 has joined #pypy
<Guest60> (I guess I do know that A and B are distinct: there are no states in which both could run, so perhaps the JIT takes the sequence of approximations above because it can't assume that?)
Guest60 has quit [Client Quit]
Dejan has quit [Quit: Leaving]