2 ms·
His implementation of the KMP algorithm starts by constructing a table for the whole of one string, to use in matching the other. But the full table is seldom
by btilly 16y ago
His implementation of the KMP algorithm starts by constructing a table for the whole of one string, to use in matching the other. But the full table is seldom needed. I wonder how much of the performance is taken in that construction, and how much of a difference only constructing part of that would make.