Commit 8bd98d7
committed
Add HashMap enhancements and benchmarking updates
Added `Count` and `Capacity` properties to the `HashMap` class to expose its size and capacity. Introduced a `Clear` method to reset the hash map.
Simplified `Main` in `Program.cs` by removing `Utils.QSort` usage. Added a `HashMap<int, int>` instance to `UnsafeDictionaryBenchmark` for performance testing.
Updated `Setup` in `UnsafeDictionaryBenchmark` to clear the `HashMap` during initialization. Added a new `AddHashMap` benchmark method to measure `HashMap` performance, including automatic clearing when size exceeds 100,000.1 parent 01c3829 commit 8bd98d7
2 files changed
+28
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
226 | 230 | | |
227 | 231 | | |
228 | 232 | | |
| |||
360 | 364 | | |
361 | 365 | | |
362 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
363 | 378 | | |
364 | 379 | | |
365 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 11 | + | |
20 | 12 | | |
21 | 13 | | |
22 | 14 | | |
| |||
89 | 81 | | |
90 | 82 | | |
91 | 83 | | |
| 84 | + | |
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
| |||
97 | 90 | | |
98 | 91 | | |
99 | 92 | | |
| 93 | + | |
100 | 94 | | |
101 | 95 | | |
102 | 96 | | |
| |||
110 | 104 | | |
111 | 105 | | |
112 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
| |||
0 commit comments