Commit d1ef4c9
committed
HM_RehashIfRequired: Determine the optimum size
When the load factor is >> 1 it can be the case that just doubling the
size does not result in a hashmap with a load factor smaller than
HM_MAX_LOAD_FACTOR.
So let's calculate the optimum hashmap size instead. By factoring it out
into a function we can also properly test it.1 parent 2e82552 commit d1ef4c9
2 files changed
+36
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
781 | 791 | | |
782 | 792 | | |
783 | 793 | | |
784 | | - | |
| 794 | + | |
785 | 795 | | |
786 | 796 | | |
787 | 797 | | |
| |||
801 | 811 | | |
802 | 812 | | |
803 | 813 | | |
| 814 | + | |
| 815 | + | |
804 | 816 | | |
805 | | - | |
| 817 | + | |
| 818 | + | |
806 | 819 | | |
807 | 820 | | |
808 | 821 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
454 | | - | |
| 454 | + | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
| 458 | + | |
458 | 459 | | |
459 | | - | |
| 460 | + | |
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
| |||
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
472 | | - | |
| 473 | + | |
473 | 474 | | |
474 | 475 | | |
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
478 | | - | |
| 479 | + | |
479 | 480 | | |
480 | 481 | | |
481 | 482 | | |
482 | 483 | | |
483 | | - | |
| 484 | + | |
484 | 485 | | |
485 | 486 | | |
486 | | - | |
| 487 | + | |
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
| |||
590 | 591 | | |
591 | 592 | | |
592 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
0 commit comments