postcss / postcss-url

PostCSS plugin to rebase url(), inline or copy asset.
MIT License
377 stars 60 forks source link

Use faster xxhash implementaion #167

Open Brooooooklyn opened 2 years ago

Brooooooklyn commented 2 years ago

@node-rs/xxhash is significant faster than xxhashjs:

@node-rs/xxhash h32 x 18,847 ops/sec ±3.81% (81 runs sampled)
xxhashjs h32 x 1,035 ops/sec ±11.04% (68 runs sampled)
xxh32 bench suite: Fastest is @node-rs/xxhash h32

@node-rs/xxhash 64 x 43,532 ops/sec ±1.33% (88 runs sampled)
xxhashjs h64 x 47.52 ops/sec ±3.20% (62 runs sampled)
xxh64 bench suite: Fastest is @node-rs/xxhash 64

xxh32 is 18x faster than xxhashjs and xxh64 is 916x faster than xxhashjs.