Longtime back i wrote blog to compare performance of reflection/methodhandle etc.
Methodhandle was introduced in JDK7 and its performance was not that good as compared to reflection.
Recap of test result from JDK 7
MethodHandle is right in bottom as a result it was was not of much use in JDK7.
MethodHandle is used in java 8 lambda and i think due to that lot of improvement was done in it.
Lets have look at JDK8 numbers
Methodhandle was introduced in JDK7 and its performance was not that good as compared to reflection.
Recap of test result from JDK 7
MethodHandle is right in bottom as a result it was was not of much use in JDK7.
MethodHandle is used in java 8 lambda and i think due to that lot of improvement was done in it.
Lets have look at JDK8 numbers
MethodHandle implementation of JDK8 is back.
Open JDK mailing conversation has some details about type of optimization that is required in method handle.
Code used for this blog is available @ github
Update -
One of the reader asked for raw numbers, numbers are in Mili Second
Awesome post, this post has really got some valid useful content with it. Great job; Do share more post regularly.
ReplyDeleteEducation Franchise India
Spoken English Franchise
Franchise For Spoken English Classes
Top Education Franchise In India
Best Education Franchise In India
Computer Education Franchise
Education Franchise India
Computer Center Franchise
Education Franchise Opportunities In India
Very Informative post.
ReplyDeleteHow to make a paper airplane | Origami paper plane