zserge / jsmn

Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket
MIT License
3.65k stars 778 forks source link

Shouldn't you use tokSuper here? #118

Open martinus opened 7 years ago

martinus commented 7 years ago

https://github.com/zserge/jsmn/blob/35086597a72d94d8393e6a90b96e553d714085bd/jsmn.c#L209

I think at this position you can use tokSuper, which should save you from iterating the array at this point:

for (i = parser->tokSuper; i >= 0; i--) {

This should speed the parser up a bit.