On Tue, May 10, 2011 at 7:13 PM, Krukow <karl.kru...@gmail.com> wrote:
> > > And I've got an impression that protocols are described to be as fast > as > > > interface dispatch (callvirt). > > Almost as fast in case one. There is an indirection because of > dispatch. > There is special support at the call site by the compiler so in "good" cases (ie interface) you just have a type check (on the interface) and the callvirt. > > So either my impression is wrong (which is totally possible) or there is > > > some clever trick available on JVM to do case 2 below faster. > > > That's why I'm asking. > > > And yes, there is a difference in performance if you extend after you > define your type. > There are also differences in flexibility : inline impls are subject to the same problems as interfaces, namely methods names clashes between interfaces or interfaces and Object. Christophe -- 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