{"id":13730211,"url":"https://github.com/SamSaffron/allocator_bench","last_synced_at":"2025-05-08T02:32:03.392Z","repository":{"id":66034654,"uuid":"75806816","full_name":"SamSaffron/allocator_bench","owner":"SamSaffron","description":"bench of various memory allocators","archived":false,"fork":false,"pushed_at":"2020-07-06T06:07:40.000Z","size":20,"stargazers_count":54,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T00:33:27.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamSaffron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-12-07T06:33:02.000Z","updated_at":"2025-03-15T10:28:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"19b707ec-b8ba-42cf-86e5-1e745d1533c2","html_url":"https://github.com/SamSaffron/allocator_bench","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamSaffron%2Fallocator_bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamSaffron%2Fallocator_bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamSaffron%2Fallocator_bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamSaffron%2Fallocator_bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamSaffron","download_url":"https://codeload.github.com/SamSaffron/allocator_bench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252986893,"owners_count":21836250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:11.579Z","updated_at":"2025-05-08T02:32:03.125Z","avatar_url":"https://github.com/SamSaffron.png","language":"Ruby","readme":"To run benchmarks\n\n1. Install lockless from https://locklessinc.com/downloads/ in lockless_allocator path make\n2. Install Hoard from https://github.com/emeryberger/Hoard in Hoard and make\n4. Run `ruby make_jemallocs.rb`\n5. Run `ruby make_tcmallocs.rb`  # You need to install libunwind-dev before\n3. Run `ruby make_mimalloc.rb`\n6. Run `ruby test_all.rb`\n7. Run `STRESS_THREAD=10 ruby test_all.rb`\n\nResults: (current)\n\nUse `STRESS_THREADS=N` to simulate multi threaded ruby behavior\n\n### 8 threads\n\n\n```\nsam@arch allocator_bench % STRESS_THREADS=8 ruby test_all.rb\nruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]\nbuilt-in mem: 186336 duration: 3.422897896\nbuilt-in mem (MALLOC_ARENA_MAX=2): 135780 duration: 3.492815563\nmimalloc master: 236204 duration: 2.947209624\nrpmalloc master: 291428 duration: 2.823917527\ntcmalloc 2.0 mem: 142860 duration: 2.796963668\ntcmalloc 2.1 mem: 134952 duration: 2.9891215\ntcmalloc 2.2 mem: 131860 duration: 2.965217507\ntcmalloc 2.3 mem: 132268 duration: 2.992975175\ntcmalloc 2.4 mem: 141756 duration: 2.817269882\ntcmalloc 2.5 mem: 136376 duration: 2.763516053\ntcmalloc 2.6 mem: 135892 duration: 2.837330961\ntcmalloc 2.6.1 mem: 138776 duration: 2.800292649\ntcmalloc 2.6.2 mem: 133392 duration: 2.785083378\ntcmalloc 2.6.3 mem: 128448 duration: 2.870347233\ntcmalloc 2.7 mem: 134840 duration: 2.816580265\njemalloc 3.5.1 mem: 153808 duration: 2.98163907\njemalloc 3.6.0 mem: 139564 duration: 3.122444062\njemalloc 4.0.0 mem: 151132 duration: 3.001511518\njemalloc 4.0.1 mem: 152276 duration: 3.017984175\njemalloc 4.0.2 mem: 150684 duration: 2.993723311\njemalloc 4.0.3 mem: 157552 duration: 2.955524769\njemalloc 4.0.4 mem: 153460 duration: 2.995114601\njemalloc 4.1.0 mem: 148816 duration: 2.962291218\njemalloc 4.1.1 mem: 146660 duration: 2.951603234\njemalloc 4.2.0 mem: 147800 duration: 2.956029203\njemalloc 4.2.1 mem: 148324 duration: 2.968610441\njemalloc 4.3.0 mem: 169020 duration: 3.110291342\njemalloc 4.3.1 mem: 151936 duration: 2.967231767\njemalloc 4.4.0 mem: 160780 duration: 2.977113841\njemalloc 4.5.0 mem: 158028 duration: 2.949980599\njemalloc 5.0.0 mem: 157076 duration: 3.068324983\njemalloc 5.0.1 mem: 169572 duration: 2.905734288\njemalloc 5.1.0 mem: 153852 duration: 2.925958087\njemalloc 5.2.0 mem: 162008 duration: 2.837378225\njemalloc 5.2.1 mem: 155912 duration: 2.922026484\nlockless 1.4 mem: 249540 duration: 2.858882662\nHoard HEAD mem: 182500 duration: 2.988038568\n```\n\n\n### Single threaded\n\n```\nsam@arch allocator_bench % STRESS_THREADS=1 ruby test_all.rb\nruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]\nbuilt-in mem: 169444 duration: 3.295604446\nbuilt-in mem (MALLOC_ARENA_MAX=2): 162400 duration: 3.309020006\nmimalloc master: 143520 duration: 3.216014001\nrpmalloc master: 158732 duration: 3.183002545\ntcmalloc 2.0 mem: 137736 duration: 3.21834025\ntcmalloc 2.1 mem: 138532 duration: 3.199263054\ntcmalloc 2.2 mem: 171124 duration: 2.793094939\ntcmalloc 2.3 mem: 140144 duration: 3.157911078\ntcmalloc 2.4 mem: 169384 duration: 2.777076104\ntcmalloc 2.5 mem: 169816 duration: 2.703555291\ntcmalloc 2.6 mem: 172612 duration: 2.619339545\ntcmalloc 2.6.1 mem: 172512 duration: 2.601444421\ntcmalloc 2.6.2 mem: 144872 duration: 2.887256198\ntcmalloc 2.6.3 mem: 159620 duration: 2.526488765\ntcmalloc 2.7 mem: 173096 duration: 2.619000445\njemalloc 3.5.1 mem: 144348 duration: 3.04128121\njemalloc 3.6.0 mem: 144320 duration: 3.053938303\njemalloc 4.0.0 mem: 182760 duration: 3.016305146\njemalloc 4.0.1 mem: 169596 duration: 2.972724988\njemalloc 4.0.2 mem: 168892 duration: 2.928217891\njemalloc 4.0.3 mem: 168924 duration: 2.952081469\njemalloc 4.0.4 mem: 161744 duration: 2.820295919\njemalloc 4.1.0 mem: 169072 duration: 2.915838045\njemalloc 4.1.1 mem: 169064 duration: 2.949833676\njemalloc 4.2.0 mem: 179084 duration: 2.922669411\njemalloc 4.2.1 mem: 169128 duration: 2.900649117\njemalloc 4.3.0 mem: 176408 duration: 3.083000318\njemalloc 4.3.1 mem: 168748 duration: 2.90019844\njemalloc 4.4.0 mem: 168928 duration: 2.896176489\njemalloc 4.5.0 mem: 174472 duration: 2.785766161\njemalloc 5.0.0 mem: 149940 duration: 2.896406334\njemalloc 5.0.1 mem: 150204 duration: 2.837875746\njemalloc 5.1.0 mem: 148476 duration: 2.824247363\njemalloc 5.2.0 mem: 168224 duration: 2.763762322\njemalloc 5.2.1 mem: 149664 duration: 2.930834257\nlockless 1.4 mem: 164468 duration: 2.873501934\nHoard HEAD mem: 174396 duration: 2.903436464\n```\n\n\nResults: (old)\n\n```\nsam@ubuntu allocator_bench % ruby test_all.rb\nruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]\nbuilt-in mem: 136560 duration: 4.92845984\nUsing the Hoard memory allocator (http://www.hoard.org), version 3.12.0\nUsing the Hoard memory allocator (http://www.hoard.org), version 3.12.0\nUsing the Hoard memory allocator (http://www.hoard.org), version 3.12.0\nUsing the Hoard memory allocator (http://www.hoard.org), version 3.12.0\nHoard HEAD mem: 167772 duration: 4.231493358\nlockless 1.4 mem: 166860 duration: 3.567809758\ntcmalloc 2.0 mem: 138608 duration: 3.96352459\ntcmalloc 2.1 mem: 145676 duration: 3.821032815\ntcmalloc 2.2 mem: 141204 duration: 3.830105653\ntcmalloc 2.3 mem: 139096 duration: 3.777037605\ntcmalloc 2.4 mem: 137548 duration: 3.826598715\ntcmalloc 2.5 mem: 139524 duration: 3.825563646\ntcmalloc 2.6 mem: 141256 duration: 3.857502124\ntcmalloc 2.6.1 mem: 141500 duration: 3.778023667\ntcmalloc 2.6.2 mem: 141244 duration: 3.798630141\ntcmalloc 2.6.3 mem: 140320 duration: 3.824998923\ntcmalloc 2.7 mem: 143192 duration: 3.726972205\njemalloc 3.0.0 mem: 141232 duration: 4.177167928\njemalloc 3.1.0 mem: 162304 duration: 3.939940393\njemalloc 3.2.0 mem: 165188 duration: 3.929158876\njemalloc 3.3.0 mem: 165164 duration: 4.135042063\njemalloc 3.3.1 mem: 153676 duration: 4.08339298\njemalloc 3.4.0 mem: 142332 duration: 4.287041471\njemalloc 3.4.1 mem: 165240 duration: 4.025545814\njemalloc 3.5.0 mem: 133892 duration: 4.065554619\njemalloc 3.5.1 mem: 165216 duration: 4.079860268\njemalloc 3.6.0 mem: 165164 duration: 4.233464591\njemalloc 4.0.0 mem: 141336 duration: 4.574956268\njemalloc 4.0.1 mem: 170944 duration: 4.248128008\njemalloc 4.0.2 mem: 177168 duration: 4.329534696\njemalloc 4.0.3 mem: 173996 duration: 3.920414509\njemalloc 4.0.4 mem: 166488 duration: 4.043237997\njemalloc 4.1.0 mem: 144080 duration: 4.084126294\njemalloc 4.1.1 mem: 140752 duration: 4.122630669\njemalloc 4.2.0 mem: 141840 duration: 4.434104776\njemalloc 4.2.1 mem: 142844 duration: 4.346471957\njemalloc 4.3.0 mem: 176972 duration: 4.883788911\njemalloc 4.3.1 mem: 142052 duration: 4.234083442\njemalloc 4.4.0 mem: 142344 duration: 4.159591159\njemalloc 4.5.0 mem: 139484 duration: 3.954587993\njemalloc 5.0.0 mem: 166592 duration: 4.013335086\njemalloc 5.0.1 mem: 173500 duration: 3.979304747\n```\n\n\n```\nsam@ubuntu allocators % ruby test_all.rb\nruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]\nbuilt-in mem: 177816 duration: 5.463205008\nHoard 3.12 mem: 191836 duration: 4.526371788\nlockless 1.3 mem: 196888 duration: 3.689470492\ntcmalloc 2.0 mem: 177840 duration: 4.184403986\ntcmalloc 2.1 mem: 178952 duration: 4.047054641\ntcmalloc 2.2 mem: 180420 duration: 4.021828904\ntcmalloc 2.3 mem: 179756 duration: 3.940098988\ntcmalloc 2.4 mem: 168828 duration: 4.073669654\ntcmalloc 2.5 mem: 171492 duration: 4.087337723\njemalloc 3.0.0 mem: 171652 duration: 4.250548191\njemalloc 3.1.0 mem: 172364 duration: 4.200444839\njemalloc 3.2.0 mem: 176748 duration: 4.249052335\njemalloc 3.3.0 mem: 177104 duration: 4.173927908\njemalloc 3.3.1 mem: 177476 duration: 4.200211943\njemalloc 3.4.0 mem: 176948 duration: 4.246032144\njemalloc 3.4.1 mem: 177436 duration: 4.334329763\njemalloc 3.5.0 mem: 177416 duration: 4.310483395\njemalloc 3.5.1 mem: 177148 duration: 4.314614055\njemalloc 3.6.0 mem: 176984 duration: 4.387391573\njemalloc 4.0.0 mem: 192256 duration: 4.594605504\njemalloc 4.0.1 mem: 185760 duration: 4.415316793\njemalloc 4.0.2 mem: 191228 duration: 4.264772339\njemalloc 4.0.3 mem: 192276 duration: 4.406336821\njemalloc 4.0.4 mem: 193844 duration: 4.292252613\njemalloc 4.1.0 mem: 184900 duration: 4.185297596\njemalloc 4.1.1 mem: 185212 duration: 4.174412318\njemalloc 4.2.0 mem: 185148 duration: 4.142911436\njemalloc 4.2.1 mem: 189636 duration: 4.116592894\njemalloc 4.3.0 mem: 230164 duration: 7.376474329\njemalloc 4.3.1 mem: 186060 duration: 4.103093871\njemalloc 4.4.0 mem: 182524 duration: 4.137382241\n```\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSamSaffron%2Fallocator_bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSamSaffron%2Fallocator_bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSamSaffron%2Fallocator_bench/lists"}