cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake | IRC logs: and | the pypy angle is to shrug and copy the implementation of CPython as closely as possible, and staying out of design decisions
epony has quit [Remote host closed the connection]
epony has joined #pypy
pbsds has quit [Quit: The Lounge -]
jcea has quit [Ping timeout: 256 seconds]
pbsds has joined #pypy
ruth2345345 has joined #pypy
otisolsen70 has joined #pypy
epony has quit [Remote host closed the connection]
epony has joined #pypy
riverboard has joined #pypy
<riverboard> Hi everyone, I've been writing a lot of algorithms in Python and noticed interesting behavior. pypy 7.3.14 cannot deal with recursion, even though sys.setrecursionlimit(9**9) is set. When it can deal with it, it is slower than CPython. Is this expected?
<riverboard> What I mean by not dealing with it, I get segmentation fault.
<mattip> riverboard: what is your workload? Are you using c-extensions (NumPy, SciPy ...)?
<riverboard> Just plain Python, no libraries. I'm solving problems here and have to avoid recursion almost everywhere. Similarly, when I see someone's Python solution using recursion, I can provide a test case that breaks it (with a runtime error). But when the stack will be small (~10^5 recursive calls) I always get better performance with CPython.
<riverboard> I am running the programs locally with the latest pypy3 (the one on the cses is older) and still encounter similar issues. The older pypy version on CSES is also better at recursion and programs that fail on my machine won't fail on the CSES server.
<mattip> it is not expected that pypy will segfault, and also not expected that it will be slower than CPython for pure python work
<mattip> could you open an issue with an example?
slav0nic has joined #pypy
<riverboard> will do
riverboard has quit [Quit: WeeChat 4.1.2]
jcea has joined #pypy
otisolsen70 has quit [Read error: Connection reset by peer]
slav0nic has quit [Ping timeout: 268 seconds]
ruth2345345 has quit [Ping timeout: 256 seconds]