Skip to content

Instantly share code, notes, and snippets.

Created July 26, 2015 02:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/90e6d0cb754ce00e5a7d to your computer and use it in GitHub Desktop.
benchmark memory allocators: jemalloc-3.6.0 / Hoard-2015 / libc-malloc

Mac OS X 10.11

memory alloc. single-threaded multi-threaded (4)
Jemalloc-3.6.0 7244770 24287999
Hoard-2015 9887913 37266817
libc-malloc 6841766 22107574

Ubuntu 15.04 (vivid)

memory alloc. single-threaded multi-threaded (2)
Jemalloc-3.6.0 10371523 19734297
Hoard-2015 11529058 21889318
libc-malloc 8534478 17111621
  • Mac OSX:
   # Mach-O (64-bit), Dynamic Libraries
   make darwin -C src/
   make -C benchmarks

   # jemalloc
   single-threaded: DYLD_INSERT_LIBRARIES=libjemalloc.dylib benchmarks/larson/larson 10 7 8 10000 1000 1 1 1
   multi-threaded (2): DYLD_INSERT_LIBRARIES=libjemalloc.dylib benchmarks/larson/larson 10 7 8 10000 1000 1 2 2
   multi-threaded (4): DYLD_INSERT_LIBRARIES=libjemalloc.dylib benchmarks/larson/larson 10 7 8 10000 1000 1 4 4
   # hoard
   single-threaded: DYLD_INSERT_LIBRARIES=libhoard.dylib benchmarks/larson/larson 10 7 8 10000 1000 1 1 1
   multi-threaded (2): DYLD_INSERT_LIBRARIES=libhoard.dylib benchmarks/larson/larson 10 7 8 10000 1000 1 2 2
   multi-threaded (4): DYLD_INSERT_LIBRARIES=libhoard.dylib benchmarks/larson/larson 10 7 8 10000 1000 1 4 4
   # libc malloc
   single-threaded: benchmarks/larson/larson 10 7 8 10000 1000 1 1 1
   multi-threaded (2): benchmarks/larson/larson 10 7 8 10000 1000 1 2 2
   multi-threaded (4): benchmarks/larson/larson 10 7 8 10000 1000 1 4 4
  • Linux
   # x86-64 (amd64)
   make linux-gcc-x86-64 -C src/
   # x86 (i386)
   linux-gcc-x86 -C src/
   # build benchmarks
   make -C benchmarks

   # jemalloc
   single-threaded: LD_PRELOAD=libjemalloc.so benchmarks/larson/larson 10 7 8 10000 1000 1 1 1
   multi-threaded (2): LD_PRELOAD=libjemalloc.so benchmarks/larson/larson 10 7 8 10000 1000 1 2 2
   multi-threaded (4): LD_PRELOAD=libjemalloc.so benchmarks/larson/larson 10 7 8 10000 1000 1 4 4
   # hoard
   single-threaded: LD_PRELOAD=libhoard.so benchmarks/larson/larson 10 7 8 10000 1000 1 1 1
   multi-threaded (2): LD_PRELOAD=libhoard.so benchmarks/larson/larson 10 7 8 10000 1000 1 2 2
   multi-threaded (4): LD_PRELOAD=libhoard.so benchmarks/larson/larson 10 7 8 10000 1000 1 4 4
   # libc malloc
   single-threaded: benchmarks/larson/larson 10 7 8 10000 1000 1 1 1
   multi-threaded (2): benchmarks/larson/larson 10 7 8 10000 1000 1 2 2
   multi-threaded (4): benchmarks/larson/larson 10 7 8 10000 1000 1 4 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment