Skip to content

Conversation

@RetroDev256
Copy link
Contributor

Update the zig tokenizer to use labeled switch statements :)

The benchmarks (and binary size) speaks for itself:

image

@RetroDev256
Copy link
Contributor Author

RetroDev256 commented Sep 9, 2024

image

Seems like it needs a zig1.wasm update. I'll leave that to you guys.

@Rexicon226
Copy link
Contributor

Rexicon226 commented Sep 9, 2024

Run zig build update-zig1 locally and make it a commit. A core member will replace that commit when ready to merge.

@andrewrk
Copy link
Member

Nice work!

Looks like the LLVM backend is having trouble lowering this on wasm32-wasi. Feel free to leave that to ZSF core team, we can take it from here.

@alexrp
Copy link
Member

alexrp commented Sep 10, 2024

This needs a rebase after #21371.

@RetroDev256
Copy link
Contributor Author

Managed to fit in my lunch break :)

@andrewrk
Copy link
Member

andrewrk commented Sep 10, 2024

Thanks for the merge!

@andrewrk
Copy link
Member

I have rebased and force-pushed the branch to your fork and set to auto-merge. If my work here looks OK, please sit tight and this will be landed soon.

@andrewrk andrewrk merged commit b817823 into ziglang:master Sep 11, 2024
@RetroDev256 RetroDev256 deleted the faster-tokenizer branch September 11, 2024 03:02
DivergentClouds pushed a commit to DivergentClouds/zig that referenced this pull request Sep 24, 2024
Update the zig tokenizer to use labeled switch statements
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.

4 participants