jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1021279 - /jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/Bundle.java
Date Mon, 11 Oct 2010 08:23:53 GMT
Author: thomasm
Date: Mon Oct 11 08:23:53 2010
New Revision: 1021279

URL: http://svn.apache.org/viewvc?rev=1021279&view=rev
Log:
readVarInt() is about 10% faster when reading small values

Modified:
    jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/Bundle.java

Modified: jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/Bundle.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/Bundle.java?rev=1021279&r1=1021278&r2=1021279&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/Bundle.java
(original)
+++ jackrabbit/sandbox/jackrabbit-j3/src/main/java/org/apache/jackrabbit/j3/mc/Bundle.java
Mon Oct 11 08:23:53 2010
@@ -518,6 +518,11 @@ public class Bundle {
             pos++;
             return b;
         }
+        // a separate function so that this one can be inlined
+        return readVarIntRest(b);
+    }
+
+    private int readVarIntRest(int b) {
         int x = b & 0x7f;
         b = data[pos + 1];
         if (b >= 0) {



Mime
View raw message