2 ms·
> BM/SIMD searching is never heard of by a regular developer in modern boring language Of course not, because it's usually implemented in the standard library
by burntsushi 9y ago
> BM/SIMD searching is never heard of by a regular developer in modern boring language
Of course not, because it's usually implemented in the standard library of whatever language you're using. But if your strings aren't stored in contiguous memory, then having to flatten every string into contiguous memory before searching also presents a significant performance cost.
> What's the reason to concatenate prematurely AND by hand, if it could be done automatically and only if needed?
I feel like you're missing my point. My point isn't that "contiguous memory is better than not contiguous memory." My point is that "contiguous memory strings are bad design" is completely unwarranted outside of the context of a specific use case. Outside of specific use cases, the only thing we should be doing is discussing trade offs, and not declaring a monopoly on what constitutes "bad design."