alamb opened a new pull request, #9916:
URL: https://github.com/apache/arrow-datafusion/pull/9916

   On https://github.com/apache/arrow-datafusion/pull/9824 @comphead  saw that 
using `Arc<String>` made a significant difference in planning benchmarks 
compared to `Arc<str>` - 
https://github.com/apache/arrow-datafusion/pull/9824#issuecomment-2030071719
   
   I believe this is due to the fact that the original data often comes as a 
`String` so making an `Arc<str>` results in a second copy.
   
   I want to test if the Rust compiler is smart enough to avoid copying when 
using `impl Into<Arc<str>>`  -- I thought it was, but the docs seem to suggest 
that is not the case. I made a small change in 
d21617c5674a4a67abcf8eea43810cb674152310 on top of the change in 
https://github.com/apache/arrow-datafusion/pull/9824 
   
   
https://doc.rust-lang.org/std/sync/struct.Arc.html#impl-From%3CString%3E-for-Arc%3Cstr%3E
   


-- 
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]

Reply via email to