Jukka Lehtosalo
Jukka Lehtosalo
Yeah, it's not clear whether more inlining is worth it yet. With a native back end compile time hopefully would be less of an issue, and more of these may...
Here's another idea. Consider code like this, which comes up a lot: ``` r1 = CPyTagged_Add(x, 2) dec_ref x x = r1 ``` We could merge the addition and decref...
We can perhaps slightly speed up integer unboxing operations as well by combining `CPyTagged_FromObject` and a decref. These often happen together when reading an integer from a list. We could...
Similar to https://github.com/mypyc/mypyc/issues/757#issuecomment-715949899, we could have specialized primitives for increment and decrement.
I experimented with inlining tagged integer add/sub operations, and the impact to compile times and the size of the binary were negligible (when self-compiling). These operations aren't actually that frequent...
I may look into this at some point, but I don't have any immediate plans. I'd be happy to help somebody who wants work on this tough.
@JunyiXie Sounds great! I agree that this will be a lot of work, and I strongly recommend splitting it into multiple PRs that can be merged separately. This way you...
Here are some commonly used functions with relative frequencies in a corpus based on top PyPI packages: - `builtins.round` (~3000 instances) - `log2`, `log10` (~700 instances) - `asin`, `acos`, `atan`...
The behavior should 100% match Python behavior. We already jump through some hoops to do this, since C functions generally don't match Python behavior in edge cases. (Eventually we might...
In terms of priority, this sounds like the next most promising major perf improvement once packed arrays are supported.