Date: Sat, 25 Feb 2023 20:48:05 -0500
Just like everything else in the standard library, they should be adequate
to good for most uses. None of the standard containers were designed to be
the best for almost all cases, not even std::vector. As long as I don't
have to tell people to avoid them, they are probably good enough. Best if
the obvious use of them is inherently correct.
Much text processing is tied to IO and the performance is mostly secondary.
If we could make accidentally incorrect harder to do that would be a win.
I think range interfaces give the widest general permissions to provide
more specialized alternatives, like a forward SIMD decoder sending data to
an optimized vector-ish back inserter.
I do think a specialized text type with better support for in the middle
inserts and deletes would be useful, but also very much orthogonal to the
papers we're looking at now. I have some plans to bring forward a paper
proposing 2,3-finger trees as a data structure (rope-like but more recent,
and also a persistent data structure) that might be useful for a text
manipulation type, but I think the underlying container should probably be
generic and retrievable from text.
to good for most uses. None of the standard containers were designed to be
the best for almost all cases, not even std::vector. As long as I don't
have to tell people to avoid them, they are probably good enough. Best if
the obvious use of them is inherently correct.
Much text processing is tied to IO and the performance is mostly secondary.
If we could make accidentally incorrect harder to do that would be a win.
I think range interfaces give the widest general permissions to provide
more specialized alternatives, like a forward SIMD decoder sending data to
an optimized vector-ish back inserter.
I do think a specialized text type with better support for in the middle
inserts and deletes would be useful, but also very much orthogonal to the
papers we're looking at now. I have some plans to bring forward a paper
proposing 2,3-finger trees as a data structure (rope-like but more recent,
and also a persistent data structure) that might be useful for a text
manipulation type, but I think the underlying container should probably be
generic and retrievable from text.
Received on 2023-02-26 01:48:18