elide pass-by-ref in root functions#21
Conversation
|
Presumably this is for performance -- do you have a benchmark comparison? Can you get the same effect by just binding |
here — it reliably cuts about 1/5 off the time for
No, the compiler already lifts the load to the start of the function — this PR elides the load altogether. The problem is the trait methods take |
|
Ah, I did some profiling, and now I see it's a difference of inlining. The current code doesn't inline at all, but with your change it's inlining the outer Thanks! bors r+ |
Build succeeded |
No description provided.