3 ms·
You have answered your question yourself: your algorithm looks at each byte twice, not once It's even more obvious in the UTF case where the classic implementa
by jxndnxu 2y ago
You have answered your question yourself: your algorithm looks at each byte twice, not once
It's even more obvious in the UTF case where the classic implementation first looks at 1-4 byte to parse a character and only then checks if it's a space