aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/diff_delta.go
diff options
context:
space:
mode:
authorMiguel Molina <miguel@erizocosmi.co>2017-09-07 10:02:29 +0200
committerMiguel Molina <miguel@erizocosmi.co>2017-09-07 10:58:47 +0200
commit90418e6ab682d1888dd7658a8ebd72a7be8cf502 (patch)
tree12c8fe4d2ec04400ac6f50b46184fb3cda94eb99 /plumbing/format/packfile/diff_delta.go
parent508a89726c9287b3fb5daac23b7957d4297bc42a (diff)
downloadgo-git-90418e6ab682d1888dd7658a8ebd72a7be8cf502.tar.gz
packfile: parallelize deltification of objects in groups
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Diffstat (limited to 'plumbing/format/packfile/diff_delta.go')
-rw-r--r--plumbing/format/packfile/diff_delta.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/plumbing/format/packfile/diff_delta.go b/plumbing/format/packfile/diff_delta.go
index 7c9360e..2e58ec6 100644
--- a/plumbing/format/packfile/diff_delta.go
+++ b/plumbing/format/packfile/diff_delta.go
@@ -135,26 +135,6 @@ func encodeInsertOperation(ibuf, buf *bytes.Buffer) {
ibuf.Reset()
}
-// https://lemire.me/blog/2015/10/22/faster-hashing-without-effort/
-func hashBuf(buf []byte) int64 {
- var h int64
- var i int
- len := len(buf)
- for ; i+3 < len; i += 4 {
- h = 31*31*31*31*h +
- 31*31*31*int64(buf[i]) +
- 31*31*int64(buf[i+1]) +
- 31*int64(buf[i+2]) +
- int64(buf[i+3])
- }
-
- for ; i < len; i++ {
- h = 31*h + int64(buf[i])
- }
-
- return h
-}
-
func matchLength(src, tgt []byte, otgt, osrc int) int {
l := 0
for {