3 ms·
I love logic. However, when dealing with optimizations, actual experimentation is a lot more convincing. I've seen far too many times when things 'should have
by wccrawford 15y ago
I love logic.
However, when dealing with optimizations, actual experimentation is a lot more convincing. I've seen far too many times when things 'should have been' better a certain way, but weren't... For various reasons.
- fogus 15y agoLogic isn't even required in this case (although I suppose it can never hurt). Charles Nutter has shared some numbers for JRuby constant lookups at http://blog.headius.com/2011/08/invokedynamic-in-jruby-constant-lookup.html http://blog.headius.com/2011/08/invokedynamic-in-jruby-const... - JRuby 2 - JRuby with current invokedynamic 35 - JRuby with some dev build that some guy who knows a guy who knows a guy at Oracle gave him: 0.5 [1] The future might look bright, but a problem with the future is that it comes when it's ready and never before, no matter how much we want it to or might need it. [1]: I'm just being playful here. I actually have no idea where Charles got that dev build.
- headius 15y agoinvokedynamic is extremely powerful whenever there's a need to dynamically bind some function or variable. That means even statically-typed languages might benefit. In JRuby, it brings us within a stone's throw of Java performance for simple algorithms, provided that the Java version is doing the same work (e.g. doing boxed math for math algorithms). Regarding [1], I made the build myself. Here's my build script and instructions: https://gist.github.com/1148321 https://gist.github.com/1148321 To get the best possible performance, you'll want several unapplied patches from the Hotspot team. Ask on the mlvm-dev list.