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

tinyqueue #7

Open
joakim opened this issue Oct 26, 2024 · 0 comments
Open

tinyqueue #7

joakim opened this issue Oct 26, 2024 · 0 comments

Comments

@joakim
Copy link

joakim commented Oct 26, 2024

If you want it, you can adopt mine (npm)!

It could be even tinier, the first version was, but the latest version has better performance and is still tiny (252 bytes minzipped).

The voodo at line 37 was confirmed to work by one of the benchmarks, if I remember correctly. The voodo at lines 24-27 could probably use some more testing to find the sweet spot. Or just remove it and be happy for the few bytes shaved off.

The benchmarks are not great. They should have been written by someone who knows the art of benchmarking, which I don't. I assume you do 🙂

I did of course use tinybench to test it against other FIFO queue packages, and it's no slouch, if the results can be trusted. Although not in the benchmarks, I also tested it against yocto-queue, and they were almost identical in performance. That one uses ES2022 syntax (and is 42% larger). Mine uses ES2015 syntax, which has broader support.

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

1 participant