Skip to content

tinyqueue #7

@joakim

Description

@joakim

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions