Tokenization: inline position counting
Tokenization: optimize performance further