Skip to content

Commit 92dedf3

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
mingw: use mimalloc
Thorough benchmarking with repacking a subset of linux.git (the commit history reachable from 93a6fef ([PATCH] fix the SYSCTL=n compilation, 2007-02-28), to be precise) suggest that this allocator is on par, in multi-threaded situations maybe even better than nedmalloc: `git repack -adfq` with mimalloc, 8 threads: 31.166991900 27.576763800 28.712311000 27.373859000 27.163141900 `git repack -adfq` with nedmalloc, 8 threads: 31.915032900 27.149883100 28.244933700 27.240188800 28.580849500 In a different test using GitHub Actions build agents (probably single-threaded, a core-strength of nedmalloc)): `git repack -q -d -l -A --unpack-unreachable=2.weeks.ago` with mimalloc: 943.426 978.500 939.709 959.811 954.605 `git repack -q -d -l -A --unpack-unreachable=2.weeks.ago` with nedmalloc: 995.383 952.179 943.253 963.043 980.468 While these measurements were not executed with complete scientific rigor, as no hardware was set aside specifically for these benchmarks, it shows that mimalloc and nedmalloc perform almost the same, nedmalloc with a bit higher variance and also slightly higher average (further testing suggests that nedmalloc performs worse in multi-threaded situations than in single-threaded ones). In short: mimalloc seems to be slightly better suited for our purposes than nedmalloc. Seeing that mimalloc is developed actively, while nedmalloc ceased to see any updates in eight years, let's use mimalloc on Windows instead. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b68ebbf commit 92dedf3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

config.mak.uname

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,9 +753,7 @@ ifeq ($(uname_S),MINGW)
753753
HAVE_LIBCHARSET_H = YesPlease
754754
USE_GETTEXT_SCHEME = fallthrough
755755
USE_LIBPCRE = YesPlease
756-
ifneq (CLANGARM64,$(MSYSTEM))
757-
USE_NED_ALLOCATOR = YesPlease
758-
endif
756+
USE_MIMALLOC = YesPlease
759757
NO_PYTHON =
760758
ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))
761759
# Move system config into top-level /etc/

0 commit comments

Comments
 (0)