You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mslapek (via GitHub)" <gi...@apache.org> on 2023/03/19 14:28:28 UTC

[GitHub] [arrow-datafusion] mslapek commented on issue #5157: Optimizer is slow: Avoid too many string cloning in the optimizer

mslapek commented on issue #5157:
URL: https://github.com/apache/arrow-datafusion/issues/5157#issuecomment-1475276695

   **TBH** String interning would be the best ⭐️ - no cloning, quick `Eq`/`Hash`...
   
   Instead of `String` we could use `StringId`:
   
   ```rust
   #[derive(Hash, PartialEq, Eq, Copy, Clone)]
   struct StringId(usize);
   ```
   
   And some `HashMap<String, StringId>` to assign strings to unique IDs.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org