fork of 9front i guess
Go to file
Ori Bernstein 01a6de812c git: performance enhancements
Inspired by some changes made in game of trees, I've
implemented a number of speedups in git9.

First, hashing the chunks during deltification with
murmurhash instead of sha1 speeds up the delta search
significantly.

The stretch function was micro-optimized a bit as well,
since that was taking a large portion of the time when
chunking.

Finally, the full path is not stored. We only care about
grouping files with the same name and path. We don't care
about the ordering. Therefore, only the hash of the path
xored with the hash of the diretory is kept, which saves
a bunch of mallocs and string munging.

This reduces the time spent repacking some test repos
significantly.

9front:
	% time git/repack
	deltifying 97473 objects: 100%
	writing 97473 objects: 100%
	indexing 97473 objects: 100%
	58.85u 1.39s 61.82r 	 git/repack

	% time /sys/src/cmd/git/6.repack
	deltifying 97473 objects: 100%
	writing 97473 objects: 100%
	indexing 97473 objects: 100%
	43.86u 1.29s 47.51r 	 /sys/src/cmd/git/6.repack

openbsd:

	% time git/repack
	deltifying 2092325 objects: 100%
	writing 2092325 objects: 100%
	indexing 2092325 objects: 100%
	1589.48u 45.03s 1729.18r 	 git/repack

	% time /sys/src/cmd/git/6.repack
	deltifying 2092325 objects: 100%
	writing 2092325 objects: 100%
	indexing 2092325 objects: 100%
	1238.68u 41.49s 1373.15r 	 /sys/src/cmd/git/6.repack

go:
	% time git/repack
	deltifying 529507 objects: 100%
	writing 529507 objects: 100%
	indexing 529507 objects: 100%
	345.32u 7.71s 369.25r     git/repack

	% time /sys/src/cmd/git/6.repack
	deltifying 529507 objects: 100%
	writing 529507 objects: 100%
	indexing 529507 objects: 100%
	248.07u 4.47s 257.59r 	 /sys/src/cmd/git/6.repack
2022-05-28 16:38:07 +00:00
386 ape: sync flaot.h macros with u.h 2021-02-08 15:45:11 -08:00
68000 add signed fixed size integer typedefs 2018-05-12 19:19:52 +02:00
68020 ape: sync flaot.h macros with u.h 2021-02-08 15:45:11 -08:00
acme win: fix window recreation command 2020-09-16 12:41:24 +02:00
adm/timezone timezones: change DST timezone string for South Australia 2019-11-20 11:49:16 +10:30
amd64 libc: change usize to 64-bit for amd64 and arm64, make memory(2) functions use usize 2021-07-25 15:54:22 +00:00
arm ape: sync flaot.h macros with u.h 2021-02-08 15:45:11 -08:00
arm64 libc: change usize to 64-bit for amd64 and arm64, make memory(2) functions use usize 2021-07-25 15:54:22 +00:00
lib kernel: add /rc to devroot 2022-05-28 02:31:26 +00:00
mips ape: sync flaot.h macros with u.h 2021-02-08 15:45:11 -08:00
power ape: sync flaot.h macros with u.h 2021-02-08 15:45:11 -08:00
power64 add signed fixed size integer typedefs 2018-05-12 19:19:52 +02:00
rc aux/listen: Allow per service namespace files 2022-05-28 02:34:43 +00:00
sparc ape: sync flaot.h macros with u.h 2021-02-08 15:45:11 -08:00
sparc64 ape: sync flaot.h macros with u.h 2021-02-08 15:45:11 -08:00
spim add signed fixed size integer typedefs 2018-05-12 19:19:52 +02:00
sys git: performance enhancements 2022-05-28 16:38:07 +00:00