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

Use include_lines! macro rather than code generation. #17

Merged
merged 1 commit into from Oct 30, 2023

Conversation

westonal
Copy link
Contributor

@westonal westonal commented Oct 30, 2023

Just to show an alternative approach I would take over writing code generation. It just so happens this macro exists, but even if it didn't I would write it instead of code generation.

I would expect identical performance.

@sts10
Copy link
Owner

sts10 commented Oct 30, 2023

Wow! Benchmark indeed is about the same.

I'm hesitating a little to add another dependency, but it's only 65 lines of code. I just skimmed through them -- nothing fishy that I see.

@westonal
Copy link
Contributor Author

Sure, it also might be fun to see if you can recreate a similar macro. Take it or leave it of course, it's your project!

@westonal
Copy link
Contributor Author

The main "smell" for me though, just FYI, is when you go to add a new word list in future, it makes sense you need to modify the code, it's suspicious that you also need to modify the build src.

@sts10 sts10 merged commit b67ef4e into sts10:main Oct 30, 2023
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.

None yet

2 participants