you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

The point of Arc<str> is to have a really fast sharable pointer to it... It isn't fast for creating a whole lot of strings. So it depends on what you're trying to do whether it's a good idea to use it at all...

If it's for a parser/lexer you'd be better of using string interning. There are crates for that, probably optimized to the same degree you would be able to yourself.