mapbox / shelf-pack

A 2D rectangular bin packing data structure that uses the Shelf Best Height Fit heuristic
ISC License
129 stars 17 forks source link

Benchmarks #2

Closed bhousel closed 8 years ago

bhousel commented 8 years ago

Uses benchmark.js for now.. The output looks like this:

ShelfPack allocate fixed bins x 1,948 ops/sec ±4.40% (84 runs sampled)
ShelfPack allocate random width bins x 1,646 ops/sec ±5.38% (84 runs sampled)
ShelfPack allocate random height bins x 1,650 ops/sec ±3.98% (86 runs sampled)
ShelfPack allocate random height and width bins x 1,085 ops/sec ±6.93% (77 runs sampled)
BinPack allocate fixed bins x 1.98 ops/sec ±23.18% (10 runs sampled)
BinPack allocate random width bins x 2.16 ops/sec ±10.14% (10 runs sampled)
BinPack allocate random height bins x 2.20 ops/sec ±8.34% (10 runs sampled)
BinPack allocate random height and width bins x 2.05 ops/sec ±4.81% (9 runs sampled)