Repository navigation
Commit e4b9236
committed
perf(runtime): move this branch's hash containers to robin_hood
Maintainer feedback: std::unordered_map should not be used here at all —
the repo vendors robin_hood.h (already the convention in Caches.h,
MetadataBuilder.mm, SetTimeout.cpp, ModuleInternal.h) and this branch's
new containers were the stragglers. Swapped: the per-isolate module
registry maps and state table, the import map, the module/dynamic-import
waiter maps, the re-entry guard sets, the prewarm cache, and the
cache-bust key set. ModuleHandleMap moves into ModuleInternalCallbacks.h
so the registry accessor's public signature names one type.
robin_hood picks its node-based, reference-stable layout automatically
for value types that are not nothrow-movable (v8::Global), and the
waiter maps are used strictly find/drain/erase, so no usage pattern
relies on stability the flat layout would lose.
std::unordered_map uses that predate the branch (Runtime.mm, Interop.mm,
Metadata.mm, ...) are main's to sweep separately.1 parent ee4a8d3 commit e4b9236
3 files changed
Lines changed: 36 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
165 | 164 | | |
166 | 165 | | |
167 | 166 | | |
168 | | - | |
| 167 | + | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | | - | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
| |||
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
481 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
482 | 486 | | |
483 | 487 | | |
484 | 488 | | |
| |||
771 | 775 | | |
772 | 776 | | |
773 | 777 | | |
774 | | - | |
| 778 | + | |
775 | 779 | | |
776 | 780 | | |
777 | 781 | | |
| |||
1342 | 1346 | | |
1343 | 1347 | | |
1344 | 1348 | | |
1345 | | - | |
| 1349 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
17 | | - | |
18 | | - | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| |||
270 | 268 | | |
271 | 269 | | |
272 | 270 | | |
273 | | - | |
274 | | - | |
275 | 271 | | |
276 | 272 | | |
277 | 273 | | |
| |||
289 | 285 | | |
290 | 286 | | |
291 | 287 | | |
292 | | - | |
| 288 | + | |
| 289 | + | |
293 | 290 | | |
294 | | - | |
| 291 | + | |
295 | 292 | | |
296 | 293 | | |
297 | 294 | | |
| |||
336 | 333 | | |
337 | 334 | | |
338 | 335 | | |
339 | | - | |
| 336 | + | |
340 | 337 | | |
341 | 338 | | |
342 | 339 | | |
| |||
378 | 375 | | |
379 | 376 | | |
380 | 377 | | |
381 | | - | |
| 378 | + | |
382 | 379 | | |
383 | 380 | | |
384 | 381 | | |
| |||
1100 | 1097 | | |
1101 | 1098 | | |
1102 | 1099 | | |
1103 | | - | |
| 1100 | + | |
1104 | 1101 | | |
1105 | 1102 | | |
1106 | 1103 | | |
| |||
1216 | 1213 | | |
1217 | 1214 | | |
1218 | 1215 | | |
1219 | | - | |
1220 | | - | |
| 1216 | + | |
| 1217 | + | |
1221 | 1218 | | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
1225 | 1222 | | |
1226 | 1223 | | |
1227 | 1224 | | |
| |||
1230 | 1227 | | |
1231 | 1228 | | |
1232 | 1229 | | |
1233 | | - | |
| 1230 | + | |
1234 | 1231 | | |
1235 | 1232 | | |
1236 | | - | |
| 1233 | + | |
| 1234 | + | |
1237 | 1235 | | |
1238 | 1236 | | |
1239 | 1237 | | |
| |||
0 commit comments