The Black Magic of (Java) Method Dispatch

877 views
Skip to first unread message

Martin Thompson

unread,
Feb 13, 2015, 8:49:44 AM2/13/15
to mechanica...@googlegroups.com
Mr Shipilёv has out done himself with his latest master class exploring the anatomy of Java method dispatch. A brilliant example of the scientific method in action that is compelling and educational to read.


The biasing of input test data to more deeply explore a model is so well done!

Richard Warburton and I are extremely thankful as the timing is perfect given we are addressing this very issue at the core of a project dealing with dynamic dispatch of messages received from the network in a low-latency system.

Martin...



ymo

unread,
Feb 17, 2015, 3:21:56 PM2/17/15
to mechanica...@googlegroups.com
I was wondering what is the limit for the number of in lined calls inside a single method (call site). Is there a limit even ? 

Vitaly Davidovich

unread,
Feb 17, 2015, 4:08:24 PM2/17/15
to mechanica...@googlegroups.com

I believe there's a limit, but it's the same limit as what JIT uses to determine whether the method should be compiled at all due to its size (i.e. irrespective of inlining).  That limit is expressed in number of (IR) nodes, IIRC.  I think the default value is fairly large, so that shouldn't be a practice issue for human-written methods.

The limit more likely to cause problems is the nested calls one (i.e. MaxInlineLevel).

sent from my phone

--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Henri Tremblay

unread,
Apr 6, 2015, 9:19:58 PM4/6/15
to mechanica...@googlegroups.com
I just finished the article (yes, I know, I can be slow sometimes).

It is the best I've read for a while to learn low level performance optimisation.

So, Kudos to Mr. Shipilёv a must read for everyone else.

Reply all
Reply to author
Forward
0 new messages