Does the @inline annotation in Scala really help performance?
问题 Or does it just clutter up the code for something the JIT would take care of automatically anyway? 回答1: I have yet to find a case where it improves performance, and I've tried in quite a few different spots. The JVM seems to be quite good at inlining when it's possible, and even if you ask for @inline in Scala, it can't always do it (and sometimes I've noticed that it doesn't even when I think it ought to be able to). The place where you expect to see a bytecode difference is in something