Sam
unread,Jul 22, 2011, 2:10:38 PM7/22/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mustache.java
Did some benchmarking of MustacheBuilder and MustacheCompiler using
BenchmarkTest in the distribution. Also, there is a new JDK 7 branch
that uses MethodHandles rather than Reflection to call your backing
code. Here are the results:
MustacheBuilder Average
Reflection JDK 6 37,088 37,646 37,427 37,387
Reflection JDK 7 41,345 41,956 41,495 41,599
Method Handles 50,154 52,462 52,379 51,665
MustacheCompiler Average
Reflection JDK 6 35,238 35,086 34,824 35,049
Reflection JDK 7 40,078 40,081 40,032 40,064
Method Handles 41,362 46,629 44,222 44,071
What we see here is that Builder > Compiler, Handles > Reflection and
JDK 7 > JDK 6. Also, the compile time for Builder is around 10ms and
the compile time for Compiler is around 800ms. These tests were all
run on a 6-core MacPro using the latest JDK 6 from Apple and the
latest JDK 7 compiled from OpenJDK. With this result for JDK 7 I will
likely figure out a way to merge that change into the mainline and
still allow it to work with JDK 6.
Sam