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
marky1991 has quit [*.net *.split]
mgorny has quit [*.net *.split]
proteusguy has quit [*.net *.split]
raekye has quit [*.net *.split]
todda7 has quit [*.net *.split]
bbot2 has quit [*.net *.split]
lritter has quit [*.net *.split]
sven has quit [*.net *.split]
Cheery has quit [*.net *.split]
tumbleweed has quit [*.net *.split]
tazle has quit [*.net *.split]
mjacob has quit [*.net *.split]
swills has quit [*.net *.split]
trfl has quit [*.net *.split]
the_rat has quit [*.net *.split]
ulope has quit [*.net *.split]
andi- has quit [*.net *.split]
fijal has quit [*.net *.split]
altendky has quit [*.net *.split]
Taggnostr has quit [*.net *.split]
petronny has quit [*.net *.split]
igitoor has quit [*.net *.split]
infernix has quit [*.net *.split]
samth has quit [*.net *.split]
jeroud has quit [*.net *.split]
jcea has quit [*.net *.split]
wallet42___ has quit [*.net *.split]
kirma has quit [*.net *.split]
astronavt has quit [*.net *.split]
antocuni has quit [*.net *.split]
panosl[m] has quit [*.net *.split]
pmp-p has quit [*.net *.split]
jiffe has quit [*.net *.split]
bogner has quit [*.net *.split]
toad_polo has quit [*.net *.split]
Dejan has quit [*.net *.split]
mattip has quit [*.net *.split]
redj has quit [*.net *.split]
lazka has quit [*.net *.split]
gsnedders has quit [*.net *.split]
luizirber has quit [*.net *.split]
holdsworth_ has quit [*.net *.split]
exarkun has quit [*.net *.split]
jacob22 has quit [*.net *.split]
Ashleee has quit [*.net *.split]
LarstiQ has quit [*.net *.split]
gutworth has quit [*.net *.split]
WGH has quit [*.net *.split]
Ninpo has quit [*.net *.split]
alcarithemad has quit [*.net *.split]
ammar2 has quit [*.net *.split]
ronan has quit [*.net *.split]
nimaje has quit [*.net *.split]
cfbolz has quit [*.net *.split]
Civil has quit [*.net *.split]
simpson has quit [*.net *.split]
JStoker has quit [*.net *.split]
pjenvey has quit [*.net *.split]
danchr has quit [*.net *.split]
mwhudson has quit [*.net *.split]
nopf has quit [*.net *.split]
mgedmin has quit [*.net *.split]
dddddd has quit [*.net *.split]
_aegis_ has quit [*.net *.split]
jerith_ has quit [*.net *.split]
dustinm has quit [*.net *.split]
[Arfrever] has quit [*.net *.split]
xcm has quit [*.net *.split]
marmoute has quit [*.net *.split]
iko_ has quit [*.net *.split]
lastmikoi has quit [*.net *.split]
riddle has quit [*.net *.split]
marvin_ has quit [*.net *.split]
dstufft has quit [*.net *.split]
dnshane has quit [*.net *.split]
tos9 has quit [*.net *.split]
arigato has quit [*.net *.split]
phlebas has quit [*.net *.split]
Kronuz has quit [*.net *.split]
shodan45 has quit [*.net *.split]
oml has quit [*.net *.split]
energizer has quit [*.net *.split]
wleslie has quit [*.net *.split]
sknebel has quit [*.net *.split]
_habnabit has quit [*.net *.split]
jneen has quit [*.net *.split]
oberstet has quit [*.net *.split]
glyph has quit [*.net *.split]
danilonc has quit [*.net *.split]
runciter has quit [*.net *.split]
kbtr has quit [*.net *.split]
kipras`away has quit [*.net *.split]
lobo_ has quit [*.net *.split]
nulano has quit [*.net *.split]
commandoline has quit [*.net *.split]
atomizer has quit [*.net *.split]
whitewolf has quit [*.net *.split]
dansan has quit [*.net *.split]
tbodt has quit [*.net *.split]
Hodgestar has quit [*.net *.split]
astrojl_matrix has quit [*.net *.split]
EWDurbin has quit [*.net *.split]
Lightsword has quit [*.net *.split]
kristjansson has quit [*.net *.split]
graingert has quit [*.net *.split]
string has quit [*.net *.split]
ebarrett has quit [*.net *.split]
dnshane has joined #pypy
whitewolf has joined #pypy
phlebas has joined #pypy
ebarrett has joined #pypy
jneen has joined #pypy
jcea has joined #pypy
tazle has joined #pypy
Dejan has joined #pypy
oberstet has joined #pypy
ronan has joined #pypy
pmp-p has joined #pypy
nopf has joined #pypy
kipras`away has joined #pypy
andi- has joined #pypy
fijal has joined #pypy
altendky has joined #pypy
jiffe has joined #pypy
mattip has joined #pypy
glyph has joined #pypy
mgedmin has joined #pypy
Taggnostr has joined #pypy
mjacob has joined #pypy
dddddd has joined #pypy
jacob22 has joined #pypy
nimaje has joined #pypy
danilonc has joined #pypy
panosl[m] has joined #pypy
oml has joined #pypy
astrojl_matrix has joined #pypy
toad_polo has joined #pypy
lobo_ has joined #pypy
lazka has joined #pypy
redj has joined #pypy
_aegis_ has joined #pypy
riddle has joined #pypy
trfl has joined #pypy
dstufft has joined #pypy
energizer has joined #pypy
wleslie has joined #pypy
marvin_ has joined #pypy
nulano has joined #pypy
Lightsword has joined #pypy
string has joined #pypy
samth has joined #pypy
petronny has joined #pypy
igitoor has joined #pypy
infernix has joined #pypy
Civil has joined #pypy
_habnabit has joined #pypy
LarstiQ has joined #pypy
tbodt has joined #pypy
runciter has joined #pypy
JStoker has joined #pypy
simpson has joined #pypy
kbtr has joined #pypy
bogner has joined #pypy
danchr has joined #pypy
pjenvey has joined #pypy
xcm has joined #pypy
luizirber has joined #pypy
atomizer has joined #pypy
[Arfrever] has joined #pypy
swills has joined #pypy
dustinm has joined #pypy
commandoline has joined #pypy
jerith_ has joined #pypy
sknebel has joined #pypy
cfbolz has joined #pypy
gsnedders has joined #pypy
EWDurbin has joined #pypy
tos9 has joined #pypy
wallet42___ has joined #pypy
astronavt has joined #pypy
Ashleee has joined #pypy
kirma has joined #pypy
graingert has joined #pypy
kristjansson has joined #pypy
antocuni has joined #pypy
ulope has joined #pypy
jeroud has joined #pypy
dansan has joined #pypy
the_rat has joined #pypy
arigato has joined #pypy
mwhudson has joined #pypy
exarkun has joined #pypy
holdsworth_ has joined #pypy
alcarithemad has joined #pypy
ammar2 has joined #pypy
gutworth has joined #pypy
WGH has joined #pypy
shodan45 has joined #pypy
marmoute has joined #pypy
Kronuz has joined #pypy
Hodgestar has joined #pypy
Ninpo has joined #pypy
iko_ has joined #pypy
lastmikoi has joined #pypy
tumbleweed has joined #pypy
marky1991 has joined #pypy
mgorny has joined #pypy
bbot2 has joined #pypy
raekye has joined #pypy
todda7 has joined #pypy
sven has joined #pypy
lritter has joined #pypy
proteusguy has joined #pypy
Cheery has joined #pypy
rubdos has quit [Max SendQ exceeded]
panosl[m] has quit [Ping timeout: 244 seconds]
astrojl_matrix has quit [Ping timeout: 246 seconds]
marky1991 has quit [Remote host closed the connection]
oml has quit [Ping timeout: 260 seconds]
marky1991_2 has joined #pypy
rubdos has joined #pypy
stillinbeta has quit [Ping timeout: 274 seconds]
stillinbeta has joined #pypy
agronholm has quit [Ping timeout: 264 seconds]
toad_polo has quit [Ping timeout: 246 seconds]
agronholm has joined #pypy
panosl[m] has joined #pypy
oml has joined #pypy
astrojl_matrix has joined #pypy
oml has quit [Ping timeout: 240 seconds]
astrojl_matrix has quit [Ping timeout: 246 seconds]
panosl[m] has quit [Ping timeout: 246 seconds]
astrojl_matrix has joined #pypy
toad_polo has joined #pypy
panosl[m] has joined #pypy
oml has joined #pypy
oberstet has quit [Quit: Leaving]
lritter has quit [Ping timeout: 246 seconds]
lritter has joined #pypy
jcea has quit [Ping timeout: 258 seconds]
jcea has joined #pypy
jcea has quit [Ping timeout: 260 seconds]
lritter has quit [Quit: Leaving]
<fijal>
I mean more specifically "cython" the program is slow on pypy
<fijal>
like cpython cython foo.pyx is faster than pypy cython foo.pyx
<fijal>
I don't think there are any surprises tbh
otisolsen70 has joined #pypy
proteusguy has quit [Ping timeout: 264 seconds]
proteusguy has joined #pypy
<cfbolz>
fijal: that's the usual "tree walking/interpretering/etc is slow"
<simpson>
I wonder if that meme needs updating. The tree walker in Typhon (Monte in RPython) is not a very fast interpreter, but it's overall faster than bytecode which was originally designed for Smalltalk and then copied to Self to Java to E to Monte. Maybe "tree walking can't be fast" is better.
* simpson
should write new bytecode for Typhon
<cfbolz>
no no
<cfbolz>
I mean if you write interpreters in app level python code
<cfbolz>
the jit is not so good
<simpson>
Aha! I see.
<mattip>
cfbolz: if you could start over with cython/sphinx, what would a better design be?
<cfbolz>
mattip: a bit unclear, I think somehow it's a limitation of pypy
<cfbolz>
and I don't know how to remove it either
<cfbolz>
(or a limit of tracing, really)
<cfbolz>
open research question
<mattip>
what is that research called? I would like to learn a bit
<cfbolz>
mattip: nobody is working on this
<mattip>
is it fair to say that in other fields they would use flex/bison rather than writing a parser in python?
<cfbolz>
mattip: it's not really about the parser per se
<cfbolz>
it's more that the highly variable control flow that these kind of systems exhibit are badly supported by tracing
<cfbolz>
(a related problem pops up in various contexts, eg CPU's have a hard time with branch prediction for these systems)
<mattip>
is there a different strategy that would yield better results than cpython?
<cfbolz>
mattip: as I said, I don't think anybody knows. method-based JIT compilers don't do as terribly
<cfbolz>
but they also have problems with heavy polymorphism
<cfbolz>
it's not really a practical way to teach the JIT how to remove the overhead of tree-y code
<antocuni>
another thing to consider is that people are used to write code which works well on method-based compilers (either JIT or non JIT), but less used to write code optimized for tracing compilers
<cfbolz>
yes, sure
<antocuni>
e.g. there are constructs and abstractions which are basically free on tracing compilers but add a cost on classical compilers
<cfbolz>
but it's not like there are ways to write a parser to solve this problem
<antocuni>
what has parsing to do with it?
<cfbolz>
antocuni: show me a parser that's tracing friendly ;-)
<antocuni>
ah ok, in this sense
<antocuni>
yes I agree
<cfbolz>
anyway, it's not a solution
<cfbolz>
we can't rewrite the world to be parsing friendly
<antocuni>
sure
<cfbolz>
s/parsing/tracing
* cfbolz
needs more coffee
<mattip>
maybe we should do the opposite of numba: instead of having a @jitme decorator, have a @do_not_bother decorator
<cfbolz>
heh
<antocuni>
from some point of view, it's impressive that pypy gets good results at all on existing code 😅. Maybe it's just because python is soooo slow
<antocuni>
s/python/cpython
<simpson>
Doesn't Truffle have a way of annotating "megamorphic" sites where the polymorphism is known to explode?
<cfbolz>
simpson: on the interpreter level? or app level?
<simpson>
Hm, might be interpreter level.
<simpson>
I don't really remember what they did specially, just that they had the nonce word in their presentation.
<mattip>
for the specific case of cython, they have already identified the "hot" sections of code: these are the ones they compile to c-extensions
<cfbolz>
mattip: that's not what fijal said though. He said that running cython as an executable is slow, not the generated c code
<cfbolz>
That might be slow too
<mattip>
the executable that convertex pyx -> c is not pure python. There are parts of it that are c-extensions
<cfbolz>
Ah, they rewrote part of the compiler with cython code?
<cfbolz>
Cool, sorry, I didn't know
<cfbolz>
Then maybe it becomes faster if we don't use the pyx accelerators on PyPy? 😅
<cfbolz>
antocuni: we still don't do anything about promotions that just produce more and more cases, right?
<mattip>
that would be the first step, but then we would be back to the sphinx story, where we are now "only" 2x slower than pure-python
<cfbolz>
mattip: yes
<mattip>
they do not expend alot of effort to do the acceleration, see the Visitors files at the end of this list