Advertisement
Guest User

Untitled

a guest
Jul 21st, 2024
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.57 KB | None | 0 0
  1. ##########################################################################
  2. benchmarking with 64 elements
  3. #insert
  4. indexmap took 11.201µs:
  5. hashmap took 4.098µs:
  6. std_vec took 691ns:
  7. linked-hash-map took 6.172µs:
  8. fx hashmap took 1.563µs:
  9.  
  10. #iterate
  11. indexmap took 31ns:
  12. vec took 30ns:
  13. hashmap took 160ns:
  14. linked-hashmap took 30ns:
  15. fx hashmap took 160ns:
  16. indexmap (values only) took 30ns:
  17. linked-hashmap (with view) took 30ns:
  18. fx hashmap (values only) took 150ns:
  19.  
  20. #access
  21. indexmap took 921ns:
  22. vec took 1.703µs:
  23. vec (if access by index would be allowed) took 30ns:
  24. hashmap took 892ns:
  25. linked-hashmap took 351ns:
  26. fx hashmap took 160ns:
  27.  
  28. #clone
  29. indexmap took 2.264µs - 64
  30. vec took 151ns - 64
  31. hashmap took 1.844µs - 64
  32. linked-hashmap took 4.529µs - 64
  33. fx hashmap took 140ns - 64
  34.  
  35. #clone_from
  36. indexmap took 290ns - 64
  37. vec took 70ns - 64
  38. hashmap took 171ns - 64
  39. linked-hashmap took 4.198µs - 64
  40. fx hashmap took 90ns - 64
  41.  
  42. #push to back
  43. indexmap took 7.955µs:
  44. vec took 681ns:
  45. hashmap unsupported
  46. linked-hashmap took 411ns:
  47. fx hashmap unsupported
  48.  
  49. #remove
  50. 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
  51. indexmap took 10.611µs:
  52. 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
  53. vec took 5.14µs:
  54. can't preserve order in hashmap.
  55. hashmap took 2.675µs:
  56. 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
  57. linked-hashmap took 4.92µs:
  58. order check: 19 38 57 22 41 60 25 44 63 28 47 31 50 15 34 53 18 37 56 21 40 59 24 43 62 27 46 30 49 33 52 17 36 55 20 39 58 23 42 61 26 45 29 48 32 51 16 35 54
  59. fx hashmap took 4.909µs:
  60.  
  61. ##########################################################################
  62. benchmarking with 512 elements
  63. #insert
  64. indexmap took 34.266µs:
  65. hashmap took 34.806µs:
  66. std_vec took 1.032µs:
  67. linked-hash-map took 25.117µs:
  68. fx hashmap took 25.319µs:
  69.  
  70. #iterate
  71. indexmap took 20ns:
  72. vec took 20ns:
  73. hashmap took 791ns:
  74. linked-hashmap took 30ns:
  75. fx hashmap took 591ns:
  76. indexmap (values only) took 30ns:
  77. linked-hashmap (with view) took 30ns:
  78. fx hashmap (values only) took 491ns:
  79.  
  80. #access
  81. indexmap took 6.933µs:
  82. vec took 66.036µs:
  83. vec (if access by index would be allowed) took 30ns:
  84. hashmap took 6.793µs:
  85. linked-hashmap took 1.422µs:
  86. fx hashmap took 822ns:
  87.  
  88. #clone
  89. indexmap took 14.568µs - 512
  90. vec took 170ns - 512
  91. hashmap took 7.705µs - 512
  92. linked-hashmap took 39.525µs - 512
  93. fx hashmap took 11.833µs - 512
  94.  
  95. #clone_from
  96. indexmap took 5.62µs - 512
  97. vec took 120ns - 512
  98. hashmap took 3.326µs - 512
  99. linked-hashmap took 40.718µs - 512
  100. fx hashmap took 4.919µs - 512
  101.  
  102. #push to back
  103. indexmap took 485.894µs:
  104. vec took 19.106µs:
  105. hashmap unsupported
  106. linked-hashmap took 2.865µs:
  107. fx hashmap unsupported
  108.  
  109. #remove
  110. 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
  111. indexmap took 257.67µs:
  112. 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
  113. vec took 15.139µs:
  114. can't preserve order in hashmap.
  115. hashmap took 10.119µs:
  116. 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
  117. linked-hashmap took 8.616µs:
  118. order check: 511 468 474 480 486 492 498 504 510 467 473 479 485 491 497 503 509 466 472 478 484 490 496 502 508 465 471 477 483 489 495 501 507 464 470 476 482 488 494 500 506 463 469 475 481 487 493 499 505
  119. fx hashmap took 7.153µs:
  120.  
  121. ##########################################################################
  122. benchmarking with 100000 elements
  123. #insert
  124. indexmap took 4.830842ms:
  125. hashmap took 4.891747ms:
  126. std_vec took 71.846µs:
  127. linked-hash-map took 7.076791ms:
  128. fx hashmap took 2.273111ms:
  129.  
  130. #iterate
  131. indexmap took 20ns:
  132. vec took 30ns:
  133. hashmap took 104.75µs:
  134. linked-hashmap took 30ns:
  135. fx hashmap took 56.688µs:
  136. indexmap (values only) took 30ns:
  137. linked-hashmap (with view) took 20ns:
  138. fx hashmap (values only) took 58.28µs:
  139.  
  140. #access
  141. indexmap took 2.614549ms:
  142. vec took 2.396917068s:
  143. vec (if access by index would be allowed) took 30ns:
  144. hashmap took 2.771147ms:
  145. linked-hashmap took 901.483µs:
  146. fx hashmap took 635.487µs:
  147.  
  148. #clone
  149. indexmap took 564.263µs - 100000
  150. vec took 57.099µs - 100000
  151. hashmap took 296.143µs - 100000
  152. linked-hashmap took 8.274657ms - 100000
  153. fx hashmap took 313.325µs - 100000
  154.  
  155. #clone_from
  156. indexmap took 963.762µs - 100000
  157. vec took 358.241µs - 100000
  158. hashmap took 258.331µs - 100000
  159. linked-hashmap took 7.059298ms - 100000
  160. fx hashmap took 201.513µs - 100000
  161.  
  162. #push to back
  163. indexmap took 19.51842945s:
  164. vec took 1.239986066s:
  165. hashmap unsupported
  166. linked-hashmap took 1.379933ms:
  167. fx hashmap unsupported
  168.  
  169. #remove
  170. 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
  171. indexmap took 14.377402327s:
  172. 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
  173. vec took 575.358896ms:
  174. can't preserve order in hashmap.
  175. hashmap took 3.811505ms:
  176. 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
  177. linked-hashmap took 1.853072ms:
  178. order check: 99978 99965 99952 99993 99980 99967 99954 99995 99982 99969 99956 99997 99984 99971 99958 99999 99986 99973 99960 99988 99975 99962 99990 99977 99964 99951 99992 99979 99966 99953 99994 99981 99968 99955 99996 99983 99970 99957 99998 99985 99972 99959 99987 99974 99961 99989 99976 99963 99991
  179. fx hashmap took 1.384752ms:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement