Benchmark of the following packages with a randomly generated list of nodes
npm install
npm run benchmark
performant-array-to-tree x 102,834 ops/sec ±5.40% (82 runs sampled)
array-to-tree x 9,850 ops/sec ±27.20% (71 runs sampled)
un-flatten-tree x 10,473 ops/sec ±2.61% (86 runs sampled)
o-unflatten x 52,485 ops/sec ±22.39% (39 runs sampled)
...
Fastest is performant-array-to-tree
performant-array-to-tree x 452 ops/sec ±2.84% (84 runs sampled)
array-to-tree x 81.06 ops/sec ±1.69% (66 runs sampled)
un-flatten-tree x 0.74 ops/sec ±11.84% (6 runs sampled)
o-unflatten x 322 ops/sec ±2.74% (73 runs sampled)
...
Fastest is performant-array-to-tree