Skip to content

Conversation

RHL120
Copy link

@RHL120 RHL120 commented Feb 12, 2023

This change removes 19 lines of code and gives the function a (negligible) speed improvement .

@kasimeka
Copy link

this removes the concrete link between each Token_kind value and the name that represents it, which makes the code less readable and less extensible. the data structure that would be an improvement is a map, but that's pretty overkill

@RHL120
Copy link
Author

RHL120 commented Feb 12, 2023

this removes the concrete link between each Token_kind value and the name that represents it, which makes the code less readable and less extensible. the data structure that would be an improvement is a map, but that's pretty overkill

Yeah I guess there is a trade off here, I would chose the array method but the maintainer might disagree with me.
Thanks for the review!

@BillKek
Copy link
Contributor

BillKek commented Feb 12, 2023

Speed improvement makes by the compiler itself, IMHO. And UNREACHABLE feature lost.

@RHL120
Copy link
Author

RHL120 commented Feb 12, 2023

Speed improvement makes by the compiler itself, IMHO. And UNREACHABLE feature lost.

I can put it back.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants