BarrensZeppelin has quit [Ping timeout: 245 seconds]
BarrensZeppelin has joined #pypy
derpydoo has quit [Quit: derpydoo]
BarrensZeppelin has quit [Ping timeout: 276 seconds]
BarrensZeppelin has joined #pypy
muke has joined #pypy
<muke>
hi, if my code sees a significant (x4) performance regression using pypy over python, but it heavily uses numpy and polars, do you guys still want to know about it?
sugarbeet has quit [Ping timeout: 260 seconds]
sugarbeet has joined #pypy
BarrensZeppelin has quit [Quit: BarrensZeppelin]
<nimaje>
I trought using c extentions should be about as fast as with cpython and you just shouldn't expect improvements over cpython, as pypy can't look inside the c extention
<muke>
well, i have a fair amount of computation and complex control flow in the pure python parts of the script too
<muke>
but either way, slow downs shouldn't be expected?
<muke>
i can post my code on the mailing list if there's interest, just figured id ask first
mjacob has quit [Ping timeout: 244 seconds]
mjacob has joined #pypy
<korvo>
muke: It might not be considered a regression, but performance is still desirable. (I say this as somebody that would not be involved in fixing any performance problems in PyPy.) You may want to know that IME *removing* numpy in favor of array.array has given me speedups of 20-60x on PyPy before.
BarrensZeppelin has joined #pypy
Julian has joined #pypy
<Julian>
korvo: (because indeed I saw that coincidentally!) thanks but what confuses me is that I don't believe I was changing it after translation
<Julian>
(and yeah I think I know what the use case is there, I have a custom eq + hash)
<Julian>
I don't know what unrolling_iterable does yet but thanks I'll have a look just to learn
<Julian>
Even more confusingly I had that same assertion trigger on a completely unrelated and also (to me) innocuous looking change, so something tells me it's not the last we see of each other... I must be missing something.
<korvo>
The unroll code is not obvious, but the docs at https://rpython.readthedocs.io/en/latest/rlib.html#unroll are simple: "Looping over the iterator in RPython code will not produce a loop in the resulting flow graph but will unroll the loop instead."
<Julian>
Aha
<korvo>
So e.g. you can getattr() with an unrolled iterator, because the names aren't variables any longer but become inlined constants.
<Julian>
Got it, ok I'm sure it'll still take seeing some concrete case where I should use it before it sinks in but I get it in principle