Skip to content

Instantly share code, notes, and snippets.

@gyakoo
Forked from jesusdesantos/gist:5371743
Created October 17, 2016 22:00
Show Gist options
  • Save gyakoo/a76747aeb2fdf9f7203db426a94b1929 to your computer and use it in GitHub Desktop.
Save gyakoo/a76747aeb2fdf9f7203db426a94b1929 to your computer and use it in GitHub Desktop.
A benchmark for several allocators used in Noesis
------------------------------------------------------------------------
Memory Allocator perfomance benchmark
------------------------------------------------------------------------
local_n = n threads allocating and deallocating random blocks of max
size. Deallocations always happening in the same thread that
the corresponding allocation.
share_n = n threads allocating and deallocating random blocks of max
size from a shared list. Deallocation may happen in different
thread that the allocation one
Threads 16 B 256 B 1 KB 4 KB
------------------------------------------------------------------
-> malloc (crt visual studio 2008)
local_1 0.0017 0.0024 0.0038 0.0046
local_4 0.0030 0.0048 0.0074 0.0197
share_4 0.0140 0.0138 0.0122 0.0137
-> dlmalloc (ftp://g.oswego.edu/pub/misc/malloc.c)
local_1 0.0008 0.0012 0.0019 0.0072
-> stb_malloc (http://nothings.org/stb/stb_malloc.h)
local_1 0.0014 0.0018 0.0024 0.0026
-> tcmalloc (http://goog-perftools.sourceforge.net/doc/tcmalloc.html)
local_1 0.0010 0.0011 0.0014 0.0020
local_4 0.0021 0.0026 0.0036 0.0061
share_4 0.0091 0.0094 0.0102 0.0096
-> tbb (http://threadingbuildingblocks.org/)
local_1 0.0009 0.0012 0.0016 0.0027
local_4 0.0015 0.0022 0.0031 0.0050
share_4 0.0082 0.0083 0.0076 0.0090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment