apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
5.29k stars 973 forks source link

refactor: reduce string allocations with Cow #10475

Open erratic-pattern opened 2 weeks ago

erratic-pattern commented 2 weeks ago

This is an experiment to see if reducing string allocations with Cow has any performance improvement.

My local benchmarks show mixed results. My guess is that there is a small additional overhead due to branching when destructuring the Cow enum.

It might be worthwhile to further split these changes into individual branches to target benchmarks on specific changes instead of testing all of them at once.