3 ms·
So, if this is to measure the relative speed of a naive algorithm across multiple languages then great. If this is an attempt to measure how fast a single cpu c
by lowbloodsugar 9y ago
So, if this is to measure the relative speed of a naive algorithm across multiple languages then great. If this is an attempt to measure how fast a single cpu can scan memory for a string then there are better algorithms. This is just one: [1]
[1] https://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_algorithm