by bshlgrs · 9y ago · 0 comments
I don't at all believe that C++ can only iterate through 2000 strings a second. Python takes an imperceptibly small time to iterate through an array of a million strings when I test it out in my repl, and I imagine C++ would either be as fast or somewhat faster. This number is so ridiculous that it makes me very skeptical of the rest of the article.
Furthermore adjacent strings are likely to be adjacent in memory, from which I would naively expect cache prefetching to succeed.
Additionally, the curve is quadratic (if at all), not linear. I bet the author looked up all n strings from the vector of n strings.