Advertisement
Guest User

Zig mimalloc-bench

a guest
Apr 7th, 2024
699
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. calc = standard malloc
  2. jdzw = JdzGlobalAllocator, with a c wrapper adding deinitThread() calls on pthread destructor
  3. jdzl = JdzAllocator
  4. rpz = rpmalloc-zig, with a c wrapper adding initThread() and deinitThread() calls on pthread_create/destructor
  5. zmlc = zimalloc
  6.  
  7. rpz currently seems to segfault on crossthread frees, relevant issue here https://github.com/InKryption/rpmalloc-zig-port/issues/6 - this corresponds to the signal 11 errors in the benchmark results
  8.  
  9. zig code compiled into a shared library which uses threadlocal variables may incur a significant _tls_get_addr overhead due to inability to use initial-exec tls model. On cfrac, this overhead appears to be ~.35s, but it does not seem to be consistent across benchmarks. This affects jdzw and rpz, but not jdzl, calc and zmlc. Relevant reading here: https://maskray.me/blog/2021-02-14-all-about-thread-local-storage
  10.  
  11. #------------------------------------------------------------------
  12. # test alloc time rss user sys page-faults page-reclaims
  13. cfrac calc 03.58 3072 3.57 0.00 0 432
  14. cfrac jdzw 03.55 3712 3.55 0.00 0 382
  15. cfrac jdzl 04.42 3840 4.42 0.00 0 606
  16. cfrac rpz 03.82 4096 3.81 0.00 0 618
  17. cfrac zmlc 06.19 3584 6.19 0.00 0 530
  18. espresso calc 03.94 2432 3.93 0.00 0 466
  19. espresso jdzw 03.68 6272 3.68 0.00 0 1125
  20. espresso jdzl 04.00 6656 4.00 0.00 0 1347
  21. espresso rpz 03.76 7936 3.74 0.01 0 1668
  22. espresso zmlc 04.67 44288 4.65 0.01 0 40221
  23. barnes calc 01.86 58368 1.84 0.02 0 16563
  24. barnes jdzw 01.84 59136 1.84 0.00 0 16591
  25. barnes jdzl 01.85 59264 1.84 0.00 0 16809
  26. barnes rpz 01.91 59392 1.88 0.02 0 16806
  27. barnes zmlc 01.85 58368 1.85 0.00 0 16609
  28. redis calc 3.459 8064 0.15 0.02 0 1226
  29. redis jdzw 2.899 8960 0.12 0.03 0 1296
  30. redis jdzl 3.099 9472 0.15 0.02 0 1515
  31. redis rpz 3.140 9984 0.13 0.04 0 1722
  32. redis zmlc 4.360 14592 0.21 0.02 0 2849
  33. leanN calc 10.99 246680 25.56 0.41 0 60925
  34. leanN jdzw 09.64 251648 22.38 0.41 0 60181
  35. leanN jdzl 10.66 237392 25.64 0.34 0 57387
  36. Command terminated by signal 11
  37. leanN rpz 00.07 19968 0.01 0.01 0 2592
  38. leanN zmlc 18.75 860576 58.39 0.54 0 239853
  39. larsonN-sized calc 4.374 111744 79.05 0.32 0 27537
  40. larsonN-sized jdzw 4.056 204360 78.92 0.25 0 53356
  41. larsonN-sized jdzl 17.180 193408 76.43 0.12 0 47992
  42. Command terminated by signal 11
  43. larsonN-sized rpz 109952 8.14 0.04 0 27097
  44. larsonN-sized zmlc 121.954 418304 79.26 0.13 0 104122
  45. rptestN calc 1.628 47888 4.63 1.45 4 23932
  46. rptestN jdzw 2.356 156636 7.09 1.10 1 39526
  47. rptestN jdzl 2.344 110460 7.21 0.95 2 27601
  48. Command terminated by signal 11
  49. rptestN rpz 52864 0.04 0.09 0 13083
  50. rptestN zmlc 3.003 930720 8.13 2.43 0 319584
  51. gs calc 00.71 41100 0.71 0.00 0 7509
  52. gs jdzw 00.72 44416 0.71 0.00 0 7352
  53. gs jdzl 00.72 44288 0.71 0.01 0 7553
  54. Command terminated by signal 11
  55. gs rpz 01.07 15488 0.00 0.00 0 1755
  56. gs zmlc 00.75 79744 0.73 0.02 0 16422
  57. lua calc 03.55 99584 3.26 0.26 0 159134
  58. lua jdzw 03.51 100608 3.21 0.26 0 167373
  59. lua jdzl 03.56 100864 3.25 0.28 0 190293
  60. lua rpz 03.56 101632 3.30 0.23 0 201916
  61. lua zmlc 04.00 135928 3.44 0.53 0 464067
  62. alloc-test1 calc 03.10 13568 3.09 0.00 0 2925
  63. alloc-test1 jdzw 02.82 13824 2.81 0.00 0 2772
  64. alloc-test1 jdzl 03.06 13696 3.05 0.00 0 2886
  65. alloc-test1 rpz 03.46 13568 3.46 0.00 0 2865
  66. alloc-test1 zmlc 04.26 12800 4.26 0.00 0 2734
  67. alloc-testN calc 04.46 15488 69.81 0.06 0 3799
  68. alloc-testN jdzw 04.49 22656 70.27 0.03 0 5394
  69. alloc-testN jdzl 13.24 21344 169.39 0.01 0 4948
  70. alloc-testN rpz 06.39 23168 99.22 0.01 0 5337
  71. alloc-testN zmlc 2:01.82 34812 1889.75 0.23 0 8156
  72. sh6benchN calc 00.61 340224 8.49 0.39 0 85053
  73. sh6benchN jdzw 00.30 258760 4.27 0.18 0 65326
  74. sh6benchN jdzl 03.04 253548 44.97 0.12 0 63297
  75. sh6benchN rpz 00.42 255232 6.20 0.14 0 63704
  76. sh6benchN zmlc 25.38 231040 394.26 0.12 0 57595
  77. sh8benchN calc 02.20 248340 32.89 0.23 0 81345
  78. sh8benchN jdzw 00.81 156160 11.80 0.07 0 38826
  79. sh8benchN jdzl 07.16 151168 104.71 0.11 0 37756
  80. Command terminated by signal 11
  81. sh8benchN rpz 00.09 89728 0.00 0.03 0 22403
  82. sh8benchN zmlc 1:00.16 350388 939.36 2.84 0 1361511
  83. xmalloc-testN calc 1.906 65564 73.52 0.92 0 37802
  84. xmalloc-testN jdzw 0.428 399232 68.69 2.31 0 99628
  85. xmalloc-testN jdzl 1.387 43520 78.90 0.48 5 10835
  86. Command terminated by signal 11
  87. xmalloc-testN rpz 33920 0.31 0.00 0 8448
  88. xmalloc-testN zmlc 15.287 153592 78.87 0.36 0 175544
  89. cache-scratch1 calc 00.96 3456 0.96 0.00 0 216
  90. cache-scratch1 jdzw 01.00 4352 1.00 0.00 0 240
  91. cache-scratch1 jdzl 01.01 4736 1.01 0.00 0 458
  92. cache-scratch1 rpz 00.93 4480 0.92 0.00 0 441
  93. cache-scratch1 zmlc 00.98 4096 0.98 0.00 0 363
  94. cache-scratchN calc 00.14 3584 2.12 0.00 0 263
  95. cache-scratchN jdzw 00.14 4224 2.21 0.01 0 270
  96. cache-scratchN jdzl 00.14 4736 2.25 0.00 0 489
  97. cache-scratchN rpz 00.15 4608 2.26 0.00 0 474
  98. cache-scratchN zmlc 00.15 4224 2.28 0.00 0 412
  99. glibc-simple calc 03.16 1792 3.15 0.00 0 209
  100. glibc-simple jdzw 02.06 3200 2.05 0.00 0 476
  101. glibc-simple jdzl 02.86 2944 2.85 0.00 0 500
  102. glibc-simple rpz 02.30 2816 2.29 0.00 0 487
  103. glibc-simple zmlc 04.96 4224 4.89 0.05 0 79602
  104. glibc-thread calc 1.697 4096 31.82 0.01 14 965
  105. glibc-thread jdzw 1.698 35200 31.69 0.02 12 8607
  106. glibc-thread jdzl 7.373 33536 31.17 0.02 14 8369
  107. glibc-thread rpz 2.052 18432 31.79 0.01 13 4737
  108. glibc-thread zmlc 61.586 187136 31.37 0.13 15 46777
  109. rocksdb calc 04.37 91644 3.72 0.93 0 37101
  110. rocksdb jdzw 04.01 93696 3.48 0.78 0 20480
  111. rocksdb jdzl 04.32 91776 3.70 0.87 0 20077
  112. Command terminated by signal 11
  113. rocksdb rpz 00.06 8704 0.00 0.00 0 604
  114. rocksdb zmlc 04.75 129012 4.16 0.88 0 46085
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement