Commit c0fcad3
src: use an array for faster binding data lookup
Locally the hashing of the binding names sometimes has significant
presence in the profile of bindings, because there can be collisions,
which makes the cost of adding a new binding data non-trivial,
but it's wasteful to spend time on hashing them or dealing with
collisions at all, since we can just use the EmbedderObjectType
enum as the key, as the string names are not actually used beyond
debugging purposes and can be easily matched with a macro.
And since we can just use the enum as the key, we do not even
need the map and can just use an array with the enum as indices
for the lookup.
PR-URL: #46620
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>1 parent 68dde38 commit c0fcad3Copy full SHA for c0fcad3
File tree
Expand file treeCollapse file tree
16 files changed
+117
-56
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
16 files changed
+117
-56
lines changedOpen diff view settings
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
573 | 573 | |
574 | 574 | |
575 | 575 | |
| 576 | + |
576 | 577 | |
577 | 578 | |
578 | 579 | |
|
Collapse file
+19-11Lines changed: 19 additions & 11 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
486 | 486 | |
487 | 487 | |
488 | 488 | |
489 | | - |
490 | | - |
491 | | - |
492 | | - |
| 489 | + |
| 490 | + |
| 491 | + |
| 492 | + |
| 493 | + |
| 494 | + |
| 495 | + |
| 496 | + |
| 497 | + |
| 498 | + |
493 | 499 | |
494 | 500 | |
| 501 | + |
| 502 | + |
| 503 | + |
| 504 | + |
| 505 | + |
| 506 | + |
| 507 | + |
| 508 | + |
495 | 509 | |
496 | 510 | |
497 | 511 | |
498 | 512 | |
499 | 513 | |
500 | | - |
| 514 | + |
501 | 515 | |
502 | 516 | |
503 | 517 | |
| ||
527 | 541 | |
528 | 542 | |
529 | 543 | |
530 | | - |
531 | | - |
532 | | - |
533 | | - |
534 | | - |
535 | | - |
536 | 544 | |
537 | 545 | |
538 | 546 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
25 | 25 | |
26 | 26 | |
27 | 27 | |
| 28 | + |
28 | 29 | |
29 | 30 | |
30 | 31 | |
|
Collapse file
src/base_object_types.h
Copy file name to clipboard+69Lines changed: 69 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 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 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
Collapse file
+1-3Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
117 | 117 | |
118 | 118 | |
119 | 119 | |
120 | | - |
121 | | - |
122 | | - |
| 120 | + |
123 | 121 | |
124 | 122 | |
125 | 123 | |
|
Collapse file
+1-3Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
70 | 70 | |
71 | 71 | |
72 | 72 | |
73 | | - |
74 | | - |
75 | | - |
| 73 | + |
76 | 74 | |
77 | 75 | |
78 | 76 | |
|
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
125 | 125 | |
126 | 126 | |
127 | 127 | |
128 | | - |
| 128 | + |
129 | 129 | |
130 | 130 | |
131 | 131 | |
|
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
98 | | - |
| 98 | + |
99 | 99 | |
100 | 100 | |
101 | 101 | |
|
Collapse file
+1-3Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
54 | 54 | |
55 | 55 | |
56 | 56 | |
57 | | - |
58 | | - |
59 | | - |
| 57 | + |
60 | 58 | |
61 | 59 | |
62 | 60 | |
|
Collapse file
+9-5Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
66 | 66 | |
67 | 67 | |
68 | 68 | |
69 | | - |
70 | | - |
71 | | - |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
72 | 74 | |
73 | 75 | |
74 | 76 | |
| ||
84 | 86 | |
85 | 87 | |
86 | 88 | |
87 | | - |
88 | | - |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
89 | 93 | |
90 | 94 | |
91 | 95 | |
|
0 commit comments