Skip to content

Replace String with SmolStr in Plan

Andrey Strochuk requested to merge optimize-string into main

To measure performance boost, I use following benchmarks: cloning plan, serializing plan, and deserializing as well as other benchmarks from sbroad benches.
As a query to build plan from I took this query. After replacing String with SmolStr, we get following results:

String, µs SmolStr, µs
clone 100.50 61.161
serialize 56.428 58.167
deserialize 252.16 251.32
merge_several_column_statistics 25.129 25.568
pure_pest_parsing_many_references 394.76 389.53
pure_pest_parsing_target_query0 24.270 24.589
pure_pest_parsing_target_query1 32.364 32.827
pure_pest_parsing_target_query2 49.337 50.044
full_parsing_many_references 961.74 1000,43
full_parsing_target_query0 93.369 83.511
full_parsing_target_query1 110.84 100.21
full_parsing_target_query2 165.82 160.82

As a side effect, it also speeds up full_parsing_* benchmarks by 8-9%.

Documentation follow-up: docs#220 (closed)

Edited by Andrey Strochuk

Merge request reports