crepererum commented on PR #9824: URL: https://github.com/apache/arrow-datafusion/pull/9824#issuecomment-2031412423
If you measure a difference between `Arc<String>` and `Arc<str>` I would say its either noise or a compiler optimizer bug. The technical difference between the two is: - `Arc<String>` stores pointer to allocation, the allocation capacity and the used length (because `String` is mutable, like `Vec`) - `Arc<str>` stores pointer to allocation (which always is always trimmed) and the length So `Arc<String>` is pointless since you pay for a mutable data structure that you cannot mutate anymore. Same goes for `Arc<Vec<T>>` which should always be `Arc<[T]>`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
