Commit 72d4687
committed
perf: shared object find optimizations
when an econ item view goes looking for a
econ item, it looks through the CSharedObjectTypeCache
ideally, this would maintain a map instead of looking up
with O(n) search, but that's a more complicated and scary
change
instead, skip the amount of virtual GetTypeID calls since
SharedObject::BIsKeyEqual is only used in CSharedObjectTypeCache
so the equal types are guaranteed. on GC, BIsKeyEqual is used in
CSharedObjectTransaction as well, so we keep the old check for it.
also move to a static_cast for CEconItem to be explicit/efficient with casting1 parent d2153af commit 72d4687
File tree
2 files changed
+6
-1
lines changed- src
- gcsdk
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | | - | |
| 1512 | + | |
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
| |||
0 commit comments