Re: Invokedynamic and Multiple Dispatch

2010-03-06 Thread John Rose
On Mar 6, 2010, at 5:21 PM, Larry Chester wrote: > Then to invoke on an Object x: > > lookup.get(x.getClass()).invokeGeneric(x); > > This is quite slow though (although I believe the bottleneck is in the > invokeGeneric call). I can certainly believe that: invokeGeneric is not fully implemente

Re: Invokedynamic and Multiple Dispatch

2010-03-06 Thread Larry Chester
Thanks for your reply! My aim is to dispatch based on the dynamic type of the Object as described in: http://en.wikipedia.org/wiki/Multiple_dispatch Currently my implementation revolves around building a HashMap that maps a dynamic type to a MethodHandle and invoking that: HashMap lookup = new