Skip to content

Conversation

isak-s
Copy link
Contributor

@isak-s isak-s commented Aug 2, 2025

Refactor: move 'def' and '=' handling to outside of the for loop in builtin_var

  • Eliminates repeated strcmp calls
  • Maintains existing behavior

isak-s added 3 commits August 2, 2025 16:27
- Seperate handling of 'def' and '=' into distinct blocks.
- Changes applied consistently across all C source files containing builtin_var.
@isak-s
Copy link
Contributor Author

isak-s commented Aug 2, 2025

First of all, fantastic book! Educational and fun read! :)

I'm wondering whether the amount of code duplication that this change introduces is acceptable, considering that the main goal of the code isn't to be super performant, but rather to be understandable and succinct. Perhaps the original code is better in that regard.

Would love to hear thoughts on balancing optimisations vs conciseness in this case.

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.

1 participant