These are chat archives for dropbox/pyston

26th
May 2015
Chris Seaton
@chrisseaton
May 26 2015 12:10
This is how PyPy does it http://tratt.net/laurie/research/pubs/html/bolz_diekmann_tratt__storage_strategies_for_collections_in_dynamically_typed_languages/ - we do the same thing in Truffle, and it's like inlining as it enables many more optimisations such as EA of complex data structures and unrolling of operations on them
Marius Wachtler
@undingen
May 26 2015 13:11
thanks for the link! sounds very interesting and is what I had in mind.
Marius Wachtler
@undingen
May 26 2015 19:53
I will try to come up with an implementation for our dicts so we can do a perf comparison.
Chris Toshok
@toshok
May 26 2015 20:52
so binary search in libunwind gets django-template.py down to 10 seconds
Rudi Chen
@rudi-c
May 26 2015 20:52
from?
Chris Toshok
@toshok
May 26 2015 20:52
from 14s
Rudi Chen
@rudi-c
May 26 2015 20:52
oh nice
Chris Toshok
@toshok
May 26 2015 20:53
with -T on the command line it drops to 7.4 seconds, so we should have some more room there if I can figure out how to do a single pass and only GC allocate the strings/etc when the user asks for the traceback string
it’s also nice to see a perf report screen with no red in it at all
oh, one other thing I noticed is that we do a lot of unwinding to find the topmost python frame
Marius Wachtler
@undingen
May 26 2015 20:54
:+1: awesome
Chris Toshok
@toshok
May 26 2015 20:55
might be worth it to have a TLS slot containing it that gets updated on function call/return
Travis Hance
@tjhance
May 26 2015 20:55
what’s the cpython time on that benchmark, again?
Chris Toshok
@toshok
May 26 2015 20:55
1.5s
Travis Hance
@tjhance
May 26 2015 20:55
ah...
Chris Toshok
@toshok
May 26 2015 20:55
so we’re basically in a similar (but better) situation to when I had the libgcc hack working
numbers are better than they were back in, given the comparative state of things
Marius Wachtler
@undingen
May 26 2015 20:56
and we don't have to recompile gcc :-D
Chris Toshok
@toshok
May 26 2015 20:58
yeah
Chris Toshok
@toshok
May 26 2015 22:09
ugh, PyErr_NormalizeException
"The delayed normalization is implemented to improve performance"
Travis Hance
@tjhance
May 26 2015 23:15
What's that?
Chris Toshok
@toshok
May 26 2015 23:15
there’s apparently some oddness in cpython where the exception type might not match the exception instance
normalization ensures that we throw an instance of the proper type
trouble is one of the args to NormalizeException is the traceback object (since PyErr_Fetch can override it)
Travis Hance
@tjhance
May 26 2015 23:17
Ah...
So ironically this is supposed to improve performance
Except it requires the traceback object
Chris Toshok
@toshok
May 26 2015 23:21
yeah. i guess in cpython the creation of the traceback object is much less of a big deal