문제

Caching is the usual strategy that VMs use to make dynamic method dispatch rival that of static "v-table" based method lookup. Can we take advantage of this to intelligently "pre-call" methods on various objects we expect an application to create, in hopes that we will avoid a cache miss when the method is actually used by the program in its 'normal' execution flow? Are there any languages with VMs where this practice is encouraged or somehow made easier? Can VMs themselves automate this process in times when a program is not doing much work?

도움이 되었습니까?

해결책

I think MethodHandle of JDK 1.7 is the answer. Take a look on this topic MethodHandle - What is it all about?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top