Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize Encoder.WriteValue for object names
By specifying the isVerbatim flag to names.insertQuoted, the method can avoid unquoting the name since it knows that it only needs to strip off the surrounding double quotes. Performance: name old speed new speed delta Testdata/CanadaGeometry/Encode/Value/Buffered 1.12GB/s ± 0% 1.15GB/s ± 3% ~ (p=0.151 n=5+5) Testdata/CitmCatalog/Encode/Value/Buffered 1.76GB/s ± 0% 1.99GB/s ± 1% +13.19% (p=0.008 n=5+5) Testdata/GolangSource/Encode/Value/Buffered 793MB/s ± 4% 949MB/s ± 1% +19.68% (p=0.008 n=5+5) Testdata/StringEscaped/Encode/Value/Buffered 228MB/s ± 1% 229MB/s ± 0% ~ (p=0.421 n=5+5) Testdata/StringUnicode/Encode/Value/Buffered 983MB/s ± 0% 1014MB/s ± 1% +3.12% (p=0.008 n=5+5) Testdata/SyntheaFhir/Encode/Value/Buffered 1.39GB/s ± 4% 1.65GB/s ± 1% +18.43% (p=0.008 n=5+5) Testdata/TwitterStatus/Encode/Value/Buffered 1.03GB/s ± 1% 1.23GB/s ± 0% +19.81% (p=0.008 n=5+5)
- Loading branch information