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

Optimize IsAXXX method #74

Open
bokunodev opened this issue Jan 6, 2023 · 2 comments
Open

Optimize IsAXXX method #74

bokunodev opened this issue Jan 6, 2023 · 2 comments

Comments

@bokunodev
Copy link

bokunodev commented Jan 6, 2023

we can optimize IsAXXX method to use switch statement instead of for loop.
with this, we dont need stringBelongsMethodSet

@bokunodev bokunodev changed the title Optimize valid method Optimize IsAXXX method Jan 6, 2023
@dmarkham
Copy link
Owner

dmarkham commented Nov 7, 2023

I'm interested in a PR if you have an idea.

@bokunodev
Copy link
Author

I believe, I've a prototype somewhere, unfortunately I'm currently nowhere near my computer.

manually unrolling the loop in the template and change it to switch case.I remember, i'm too lazy to fix the golden test. but I did test it and it actually perform wort with string enums also there is a proposal for loop unrolling on Go github account. so I'm not sure if it's worth to change anything, right now.

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

No branches or pull requests

2 participants