Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6303905

the current MD5 implementation is the bottleneck of my application

XMLWordPrintable

      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.

            andreas Andreas Sterbenz
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: