Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Make reflection as fast as direct calls



Probably most programmers know reflection: it’s a quite easy way for adding dynamic (scripting-like) possibilities in static languages like Java or C#. Unfortunately, reflection is blamed for being as slow as scripting languages – even few hundred times, however this can be easily optimized. In this article I’ll show you how to make reflection as fast as direct usage of methods or fields in class.

Link to the article: http://coding-masters.blogspot.com/2009/09/make-reflection-as-fast-as-direct-calls.html