3 ms·
Could someone explain why this is better than simple string substitution? Is regular string substitution much slower than this?
by k2xl 9y ago
Could someone explain why this is better than simple string substitution? Is regular string substitution much slower than this?
- jaytaylor 9y agoCame here to ask the same question, I'm not clear on what functionality this offers beyond a simple k-v substitution.
- binarymax 9y agoI am not yet 100% certain so I requested full-text access to read the paper, but I can say that a naive approach to string substitution will certainly be less performant than this, and offer less flexibility in replacement complexity without significant effort. The reason being that in a naive approach, a vocabulary of size M and a document of token size N is an O(m*n) operation in the best case - while this is claimed to be an operation of O(2n).