WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

improve parsing speed #57

@ichiriac

Description

@ichiriac

The lexer speed (reading a string from memory) is about 2,5 millions tokens / sec (depends on CPU).

It's about 3 times more slower than original PHP algorithm, but about 16 times more rapid than a jison based version (which is also more rapid than a regex version ...)

The lexer algorithm could be improved a bit, but there will not be much gain here.

The parser sometimes is 10x slower than the lexer, there is a lot of room to improve the speed, the most cost effective part is recursive parsing on structures like arrays, property chains or string concatenations.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions