Ok I think I mentioned this to you guys once before and we discussed it
but…not remembering well…
My feature request for jruby would be an option like:
–super-fast
which basically disables weird fringe “features” of ruby (which ever
ones cause the biggest hit in performance) for instance I’d imagine that
having to be able to do proc.eval(“3+a”) is expensive. So get rid of it.
Basically a “my ruby is very vanilla, so please run it as fast as you
conceivably can, given very vanilla ruby code”
I suppose the biggest objection against this is “invokedynamic will soon
fix all speed problems” and my guess is that it will at least help
but…also that there will still be significant slowdown from some
things still inherent in the language.
I had started up a small “prototype” of a similar idea once:
https://github.com/rdp/stevia (doesn’t actually have much there yet).
that basically sought to translate “vanilla ruby code” into its
equivalent of Java with everything as an Object, with casting for method
names, like:
class Something extends Object implements method_name_implementer {
static Object method_name(Object var1, Object var) {}
}
So basically only works for trivial block passing (no constant
redefinitions or anything else fancy that ruby does).
but it would be convenient if this were possible more easily with jruby
natively somehow.
Thoughts?
-Roger-