Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##########################################################################
- benchmarking with 64 elements
- #insert
- indexmap took 10.79µs:
- hashmap took 5.521µs:
- std_vec took 671ns:
- linked-hash-map took 4.809µs:
- #iterate
- indexmap took 30ns:
- vec took 30ns:
- hashmap took 171ns:
- linked-hashmap took 30ns:
- indexmap (values only) took 30ns:
- linked-hashmap (with view) took 30ns:
- #access
- indexmap took 1.032µs:
- vec took 1.002µs:
- vec (if access by index would be allowed) took 21ns:
- hashmap took 881ns:
- linked-hashmap took 321ns:
- #clone
- indexmap took 2.194µs - 64
- vec took 130ns - 64
- hashmap took 1.843µs - 64
- linked-hashmap took 4.208µs - 64
- #clone_from
- indexmap took 360ns - 64
- vec took 80ns - 64
- hashmap took 91ns - 64
- linked-hashmap took 4.218µs - 64
- #push to back
- indexmap took 9.859µs:
- vec took 661ns:
- hashmap unsupported
- linked-hashmap took 411ns:
- #remove
- 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
- indexmap took 11.241µs:
- 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
- vec took 5.099µs:
- can't preserve order in hashmap.
- hashmap took 2.726µs:
- 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
- linked-hashmap took 6.042µs:
- ##########################################################################
- benchmarking with 512 elements
- #insert
- indexmap took 36.209µs:
- hashmap took 35.187µs:
- std_vec took 1.132µs:
- linked-hash-map took 24.777µs:
- #iterate
- indexmap took 40ns:
- vec took 40ns:
- hashmap took 741ns:
- linked-hashmap took 40ns:
- indexmap (values only) took 30ns:
- linked-hashmap (with view) took 30ns:
- #access
- indexmap took 6.893µs:
- vec took 34.566µs:
- vec (if access by index would be allowed) took 30ns:
- hashmap took 6.713µs:
- linked-hashmap took 1.392µs:
- #clone
- indexmap took 13.375µs - 512
- vec took 3.487µs - 512
- hashmap took 7.976µs - 512
- linked-hashmap took 40.607µs - 512
- #clone_from
- indexmap took 5.561µs - 512
- vec took 110ns - 512
- hashmap took 3.357µs - 512
- linked-hashmap took 46.348µs - 512
- #push to back
- indexmap took 489.47µs:
- vec took 18.986µs:
- hashmap unsupported
- linked-hashmap took 2.495µs:
- #remove
- 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
- indexmap took 255.896µs:
- 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
- vec took 14.357µs:
- can't preserve order in hashmap.
- hashmap took 10.71µs:
- 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
- linked-hashmap took 8.466µs:
- ##########################################################################
- benchmarking with 100000 elements
- #insert
- indexmap took 4.854478ms:
- hashmap took 4.90929ms:
- std_vec took 60.875µs:
- linked-hash-map took 6.501278ms:
- #iterate
- indexmap took 30ns:
- vec took 30ns:
- hashmap took 96.824µs:
- linked-hashmap took 30ns:
- indexmap (values only) took 30ns:
- linked-hashmap (with view) took 30ns:
- #access
- indexmap took 2.599141ms:
- vec took 1.688370636s:
- vec (if access by index would be allowed) took 30ns:
- hashmap took 2.627945ms:
- linked-hashmap took 881.055µs:
- #clone
- indexmap took 1.033855ms - 100000
- vec took 372.568µs - 100000
- hashmap took 310.771µs - 100000
- linked-hashmap took 7.661813ms - 100000
- #clone_from
- indexmap took 998.057µs - 100000
- vec took 365.996µs - 100000
- hashmap took 264.573µs - 100000
- linked-hashmap took 7.387693ms - 100000
- #push to back
- indexmap took 19.435678885s:
- vec took 1.276001474s:
- hashmap unsupported
- linked-hashmap took 1.485804ms:
- #remove
- 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
- indexmap took 15.349310511s:
- 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
- vec took 566.700465ms:
- can't preserve order in hashmap.
- hashmap took 3.714501ms:
- 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
- linked-hashmap took 1.810892ms:
Advertisement
Add Comment
Please, Sign In to add comment