Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Conversation

@ec2
Copy link
Contributor

@ec2 ec2 commented Apr 3, 2023

Howdy! I was chatting with my good friend @jimjbrettj and was inspired to take a look at compilers and specifically the Huff compiler because it was so simple. So I thought I'd make some baby contributions.

The main contribution here is isolated to the Lexer. The primary contribution here was to remove some clones that happen super frequently. There is a downside to this as now we're matching on manually typed strings as opposed on matching on an enum. Feel free to close this PR if matching on strings isn't cool with y'all!

Noteable: Lexer is 50% faster in benchmarks. Benchmarks ran on MacOS Monterey (2.3 GHz Quad-Core Intel Core i7 with 32GB RAM)
Here is the performance difference:
Before:
Screen Shot 2023-04-03 at 3 15 55 PM
After:
Screen Shot 2023-04-03 at 3 17 48 PM

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

Labels

lexer Huff Lexer Changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants