commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject commons-compress git commit: Document why we don't use ByteBuffer now
Date Mon, 27 Feb 2017 23:10:43 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master 1cdc1622c -> d8a219252


Document why we don't use ByteBuffer now

Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/d8a21925
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/d8a21925
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/d8a21925

Branch: refs/heads/master
Commit: d8a2192521b80c08f989e9f66612b3bf675707a0
Parents: 1cdc162
Author: Sebb <sebb@apache.org>
Authored: Mon Feb 27 23:10:39 2017 +0000
Committer: Sebb <sebb@apache.org>
Committed: Mon Feb 27 23:10:39 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/commons/compress/compressors/lz4/XXHash32.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/d8a21925/src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java b/src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java
index 2777130..a406ffc 100644
--- a/src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java
+++ b/src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java
@@ -44,6 +44,8 @@ public class XXHash32 implements Checksum {
 
     private final byte[] oneByte = new byte[1];
     private final int[] state = new int[4];
+    // Note: the code used to use ByteBuffer but the manual method is 50% faster
+    // See: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/2f56fb5c
     private final byte[] buffer = new byte[BUF_SIZE];
     private final int seed;
 


Mime
View raw message