3 ms·
Logic 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
by fogus 15y ago
Logic 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.