3 ms·
> he could've thought that the simple implementation is faster but missed the fact that skip is implemented in assembly It’s not; the compiler is just fairly d
by saagarjha 7y ago
> he could've thought that the simple implementation is faster but missed the fact that skip is implemented in assembly
It’s not; the compiler is just fairly decent at transforming string manipulation routines.
- 04091948 7y ago>As Tim explained to me, first off, the reason why VB does this seemingly bizarre “find the first character match, then check if query is a prefix of source” logic is because the skipto method is not written in the naive fashion that I showed here. The skipto method is a single x86 machine instruction. oh my bad then, from this text it sounded like it was written in assembly.