have the llvm jit start emitting some capi-style calls #786
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
or maybe they are just more favorable :)