Skip to content

have the llvm jit start emitting some capi-style calls #786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 30, 2015

Conversation

kmod
Copy link
Collaborator

@kmod kmod commented Jul 30, 2015

Specifically, for any attribute accesses inside a try-catch block. Even with the new rewrites added here, there's still some perf penalty to using CAPI exceptions, so as we add more of these we should add some better heuristics for determining when to use them. One idea is to only do this for try-catch blocks that catch AttributeErrors; at some point we'll need to make it profiling-based, since quite a few exceptions get thrown through intermediate frames without try-catch blocks. (But then again, the cost of a c++ exception is roughly proportional to the number of frames it crosses so we might not have to do that to start seeing benefit in those cases.)

I'm getting a lot of variability when testing this change, so I tried benchmarking using the pgo build and it seems like the results are more stable:

      django_template3.py             3.2s (2)             3.2s (2)  +0.0%
            pyxl_bench.py             2.8s (2)             2.7s (2)  -2.6%
sqlalchemy_imperative2.py             3.1s (2)             3.1s (2)  -0.8%
                  geomean                 3.0s                 3.0s  -1.1%

or maybe they are just more favorable :)

kmod added 4 commits July 30, 2015 23:11
None are enabled in this commit, but add some of the
helpers for handling exceptions if they were to be thrown.
Eventually we'll want to have a more sophisticated way of
determining when to switch to capi exceptions; they do add
noticeable overhead when no exception gets thrown.
kmod added a commit that referenced this pull request Jul 30, 2015
have the llvm jit start emitting some capi-style calls
@kmod kmod merged commit 7ece575 into pyston:master Jul 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant