>
> Since Ruby isn't designed to run on the JVM, it doesn't have
> any syntax for type hints to avoid reflective calls. I believe method
> calls that use invokedynamic are much faster than reflective
> (non-hinted) method calls, but still a bit slower than type-hinted
> calls. So if you are in a tight loop you'll need to type hint anyway.
>
I just want to point out that Lisp wasn't designed for the JVM, either, and 
the JVM presents a few particular challenges for it, too, for example when 
it comes to special kinds of recursion.

invokedynamic actually isn't faster than reflection per se, if you are able 
to store the reflection method points in a structure to use for later. 
Actually, if you play with invokedynamic (it's not easy) on the current 
iteration of the officially released Oracle JDK, you will find that 
invokedynamic is a bit slower than calling reflected methods! I understand 
that this was fixed in trunk, and the next release of JDK 7 will have 
invokedynamic be faster.
 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to