Guest User

Untitled

a guest
Jul 21st, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.23 KB | None | 0 0
  1. ##########################################################################
  2. benchmarking with 64 elements
  3. #insert
  4. indexmap took 10.79µs:
  5. hashmap took 5.521µs:
  6. std_vec took 671ns:
  7. linked-hash-map took 4.809µs:
  8.  
  9. #iterate
  10. indexmap took 30ns:
  11. vec took 30ns:
  12. hashmap took 171ns:
  13. linked-hashmap took 30ns:
  14. indexmap (values only) took 30ns:
  15. linked-hashmap (with view) took 30ns:
  16.  
  17. #access
  18. indexmap took 1.032µs:
  19. vec took 1.002µs:
  20. vec (if access by index would be allowed) took 21ns:
  21. hashmap took 881ns:
  22. linked-hashmap took 321ns:
  23.  
  24. #clone
  25. indexmap took 2.194µs - 64
  26. vec took 130ns - 64
  27. hashmap took 1.843µs - 64
  28. linked-hashmap took 4.208µs - 64
  29.  
  30. #clone_from
  31. indexmap took 360ns - 64
  32. vec took 80ns - 64
  33. hashmap took 91ns - 64
  34. linked-hashmap took 4.218µs - 64
  35.  
  36. #push to back
  37. indexmap took 9.859µs:
  38. vec took 661ns:
  39. hashmap unsupported
  40. linked-hashmap took 411ns:
  41.  
  42. #remove
  43. order check: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  44. indexmap took 11.241µs:
  45. order check: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  46. vec took 5.099µs:
  47. can't preserve order in hashmap.
  48. hashmap took 2.726µs:
  49. order check: 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  50. linked-hashmap took 6.042µs:
  51.  
  52. ##########################################################################
  53. benchmarking with 512 elements
  54. #insert
  55. indexmap took 36.209µs:
  56. hashmap took 35.187µs:
  57. std_vec took 1.132µs:
  58. linked-hash-map took 24.777µs:
  59.  
  60. #iterate
  61. indexmap took 40ns:
  62. vec took 40ns:
  63. hashmap took 741ns:
  64. linked-hashmap took 40ns:
  65. indexmap (values only) took 30ns:
  66. linked-hashmap (with view) took 30ns:
  67.  
  68. #access
  69. indexmap took 6.893µs:
  70. vec took 34.566µs:
  71. vec (if access by index would be allowed) took 30ns:
  72. hashmap took 6.713µs:
  73. linked-hashmap took 1.392µs:
  74.  
  75. #clone
  76. indexmap took 13.375µs - 512
  77. vec took 3.487µs - 512
  78. hashmap took 7.976µs - 512
  79. linked-hashmap took 40.607µs - 512
  80.  
  81. #clone_from
  82. indexmap took 5.561µs - 512
  83. vec took 110ns - 512
  84. hashmap took 3.357µs - 512
  85. linked-hashmap took 46.348µs - 512
  86.  
  87. #push to back
  88. indexmap took 489.47µs:
  89. vec took 18.986µs:
  90. hashmap unsupported
  91. linked-hashmap took 2.495µs:
  92.  
  93. #remove
  94. order check: 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511
  95. indexmap took 255.896µs:
  96. order check: 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511
  97. vec took 14.357µs:
  98. can't preserve order in hashmap.
  99. hashmap took 10.71µs:
  100. order check: 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511
  101. linked-hashmap took 8.466µs:
  102.  
  103. ##########################################################################
  104. benchmarking with 100000 elements
  105. #insert
  106. indexmap took 4.854478ms:
  107. hashmap took 4.90929ms:
  108. std_vec took 60.875µs:
  109. linked-hash-map took 6.501278ms:
  110.  
  111. #iterate
  112. indexmap took 30ns:
  113. vec took 30ns:
  114. hashmap took 96.824µs:
  115. linked-hashmap took 30ns:
  116. indexmap (values only) took 30ns:
  117. linked-hashmap (with view) took 30ns:
  118.  
  119. #access
  120. indexmap took 2.599141ms:
  121. vec took 1.688370636s:
  122. vec (if access by index would be allowed) took 30ns:
  123. hashmap took 2.627945ms:
  124. linked-hashmap took 881.055µs:
  125.  
  126. #clone
  127. indexmap took 1.033855ms - 100000
  128. vec took 372.568µs - 100000
  129. hashmap took 310.771µs - 100000
  130. linked-hashmap took 7.661813ms - 100000
  131.  
  132. #clone_from
  133. indexmap took 998.057µs - 100000
  134. vec took 365.996µs - 100000
  135. hashmap took 264.573µs - 100000
  136. linked-hashmap took 7.387693ms - 100000
  137.  
  138. #push to back
  139. indexmap took 19.435678885s:
  140. vec took 1.276001474s:
  141. hashmap unsupported
  142. linked-hashmap took 1.485804ms:
  143.  
  144. #remove
  145. order check: 99951 99952 99953 99954 99955 99956 99957 99958 99959 99960 99961 99962 99963 99964 99965 99966 99967 99968 99969 99970 99971 99972 99973 99974 99975 99976 99977 99978 99979 99980 99981 99982 99983 99984 99985 99986 99987 99988 99989 99990 99991 99992 99993 99994 99995 99996 99997 99998 99999
  146. indexmap took 15.349310511s:
  147. order check: 99951 99952 99953 99954 99955 99956 99957 99958 99959 99960 99961 99962 99963 99964 99965 99966 99967 99968 99969 99970 99971 99972 99973 99974 99975 99976 99977 99978 99979 99980 99981 99982 99983 99984 99985 99986 99987 99988 99989 99990 99991 99992 99993 99994 99995 99996 99997 99998 99999
  148. vec took 566.700465ms:
  149. can't preserve order in hashmap.
  150. hashmap took 3.714501ms:
  151. order check: 99951 99952 99953 99954 99955 99956 99957 99958 99959 99960 99961 99962 99963 99964 99965 99966 99967 99968 99969 99970 99971 99972 99973 99974 99975 99976 99977 99978 99979 99980 99981 99982 99983 99984 99985 99986 99987 99988 99989 99990 99991 99992 99993 99994 99995 99996 99997 99998 99999
  152. linked-hashmap took 1.810892ms:
Advertisement
Add Comment
Please, Sign In to add comment