This repository was archived by the owner on Dec 24, 2022. It is now read-only.
Commit bb286ac
Dan McGee
Don't bother title-casing property names for lenient lookup
Profiling shows a significant amount of decoding time (>25%!) in this
hotspot when dealing with large, repetitive JSON documents using
underscore_style property names and requiring the lenient lookup.
The good news is there is no need to title case at all, once we remove
hyphens and underscores. The type accessor map uses a case-insensitive
lookup function, so any case will do. Note that no tests need modification
post-patch (although several would fail without the hyphen/underscore
removal).1 parent 452c1f9 commit bb286ac
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
0 commit comments