View splay-vs-treap-benchmark.diff
diff --git a/test/patch.test.js b/test/patch.test.js
index 5c32503..da9ba5b 100644
--- a/test/patch.test.js
+++ b/test/patch.test.js
@@ -48,6 +48,184 @@ describe('Patch', function () {
assert.deepEqual(iterator.getMetadata(), {b: 2})
})
+ function runBenchmark (fn, setup = () => {}, iterations = 3000) {
+ let t0, t1
View gist:ea76e04a352b19713a2e
###
### First approach
###
[class_months(es, class_name)].flat_map { |range| [range.count.to_f, month_range(range.first, upto_date).count] }
.reduce(:/) * 100
###
### Second Approach
###
View gist:9387427
# create the submission...
keys = { 'class' => 'babel-worker', 'args' => whatever }
Sidekiq::Client.push(keys.stringify_keys)