Fastest String Search Algorithm.
Amit Choudhary
amitchoudhary0523@gmail.com
Mon Jun 7 15:21:22 GMT 2021
> It's possible you have an old GLIBC - I remember a strstr bug years ago
> where
> it failed to match very large patterns.
>
I am using gcc on linux. I will check the version tomorrow.
Anyway, the generic strstr in a recent GLIBC is over 1000 times faster on
> this test.
>
So, does this mean that gcc may not be having latest GLIBC.
Modern string
> algorithms are fast due to not inspecting every single character. They
> skip most of
> the input by jumping ahead by the size of the pattern after a mismatch. So
> perhaps counterintuitively, they become much faster with a larger search
> pattern.
>
Can you please let me know what are modern string algorithms and where can
I find them so that I can compare my algorithm with them.
Regards,
Amit
More information about the Libc-alpha
mailing list