Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing IToken.tokenTypeIdx in favor of IToken.tokenType.tokenTypeIdx #1028

Open
HoldYourWaffle opened this issue Aug 31, 2019 · 2 comments
Assignees

Comments

@HoldYourWaffle
Copy link
Contributor

As discussed on gitter, creating an issue for it so I don't forget.

Are there performance reasons for tokenTypeIdx being a separate property instead of using tokenType.tokenTypeIdx?

the *Idx property was there initially, the tokenType was added for debug reasons. this creates a bit of duplication... It may be slightly faster to access the Idx directly instead of itok.tokenType.tokenTypeIdx.
It may be worth investigating the removal of tokenTypeIdx in favor of only tokenType and measure the performance difference.
There is a comparative benchmark in https://github.com/SAP/chevrotain/tree/master/packages/chevrotain/benchmark_web to test performance changes between different versions of Chevrotain. if the regression is small (1-3%) we can evaluate this model simplification.

@HoldYourWaffle
Copy link
Contributor Author

@bd82 Is it possible for you to assign me to this issue or do I need to be a member of the repository for that?

@bd82
Copy link
Member

bd82 commented Aug 31, 2019

Is it possible for you to assign me to this issue or do I need to be a member of the repository for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants