-
Enhancement
-
Resolution: Cannot Reproduce
-
P3
-
None
-
6
-
generic
-
generic
I develop a server application that has to handle a massive amount of parallel SSL connections. I use NIO and SSLEngine for that. Then I used the fine NetBeans profiler and found that the current MD5 implementation is the bottleneck of my application. I looked at the source of MD5.implCompress() and found 64 calls to trivial functions and some mathematical operations on constants.
It looks like the compiler/JVM does not do a good job at inlining. After manually inlining the function calls and pre-calculating the constant operations MD5 was around 60% faster than before.
The suggested fix to sun/security/provider/MD5.java
(submitted via mustang.dev.java.net) is too large to
include here. Refer to the attached file MD5Speed.txt.
It looks like the compiler/JVM does not do a good job at inlining. After manually inlining the function calls and pre-calculating the constant operations MD5 was around 60% faster than before.
The suggested fix to sun/security/provider/MD5.java
(submitted via mustang.dev.java.net) is too large to
include here. Refer to the attached file MD5Speed.txt.