Open andrewgazelka opened 5 hours ago
I would support converting over to Arc<str>
as well. I believe there was a cool YouTube video referencing why Arc<str>
s are more preferable in many situations than just regular String
s.
The most applicable point here is that I believe the actual field names are never in-place mutated. So yes, would make more sense to Arc<str>
it.
Found it: https://www.youtube.com/watch?v=A4cKi7PTJSs.
@andrewgazelka I think this makes sense since we often clone Fields which could cause a redundant memory allocation for String
Metadata
is alreadyArc
'd but I am not sure.https://github.com/Eventual-Inc/Daft/blob/08ca9a4078e4506afc9b774bd2f073eee94a38d9/src/daft-schema/src/field.rs#L17