These are chat archives for dropbox/pyston

7th
Jul 2015
Kevin Modzelewski
@kmod
Jul 07 2015 00:11
I wonder what we need to do to get gdb to give reasonable tracebacks through baseline-jitted code
it seems to get very confused and eventually gives up
Travis Hance
@tjhance
Jul 07 2015 00:14
It has two phases mainly so the rewriter would know when a variable isn’t needed anymore so it wouldn’t need to spill (back in the day you had to manually free the variables and the rewriter arguments had fields like “is_used_after” and it was horrible)
I’m sure it could reasonably be split in two
oh, you want a one-phase one?
hmm, I don’t know
maybe
I guess the baseline jit by its nature doesn’t need as good assembly
Travis Hance
@tjhance
Jul 07 2015 00:33
but i guess you could have an emitter class
and then two possible wrapper classes, the ‘smart’ one which collects all the actions, analyzes them for usage information, and then runs the emitter, and a ‘dumb’ one which just runs all the actions with dumb usage information
although I don’t really know if collecting the usage info is actually that slow
i guess you could get even dumber and have a ‘stack location for every variable’ and always unspill everytime you access a variable, so you don’t even have to track locations or anything, but if you go that route you might as well write a separate Rewriter from scratch
Travis Hance
@tjhance
Jul 07 2015 00:39
and I suspect (if we replace the lambdas and reduce memory allocation), the bottleneck will be in the fancy location tracking and spilling logic, not in the “first pass” or in generating the usage information (which is really pretty straightforward)
on the other hand, pyston has taught me that my intuition of what is slow and what is fast is just totally wrong XD
Kevin Modzelewski
@kmod
Jul 07 2015 06:41
wow the baseline jit has really helped startup time
Travis Hance
@tjhance
Jul 07 2015 06:59
pyston is better than pyston_interponly!
finally