diff options
| author | thenewone <[email protected]> | 2025-08-01 13:17:08 +0300 |
|---|---|---|
| committer | thenewone <[email protected]> | 2025-08-01 13:35:24 +0300 |
| commit | 3b57057abd6a6eb4eb4880051e1a55b2758ffc44 (patch) | |
| tree | ae24b053a2ef28e97d5fb9617e5ffb227feab44f /yql/essentials/sql/v1/highlight/sql_highlight.h | |
| parent | 46e4be74a9340d4152edfb8e8f739d50aaf83240 (diff) | |
Don't construct needless default value in general case.
There's a check that a yson struct member can be omitted during
encoding. For this check a default value of that member could be
constructed, which might be CPU expensive.
In this patch the default value is not constructed in the case when
is's definitely not used.
This gives improvement from:
```
BenchmarkEncode<TDeepStructLite> 41765 ns 41761 ns 16616 items_per_second=23.9456k/s
```
To:
```
BenchmarkEncode<TDeepStructLite> 8893 ns 8892 ns 78840 items_per_second=112.467k/s
```
Part 2 of <https://nda.ya.ru/t/E9Ji-1bm7Gwv6c>
commit_hash:cd74eb71e07b6e011f65f802d017bdd2b7fe7719
Diffstat (limited to 'yql/essentials/sql/v1/highlight/sql_highlight.h')
0 files changed, 0 insertions, 0 deletions
