Hi,
I did the benchmarking using benchmark.js(which is a reliable benchmarking library) and the results were not same as mentioned in the readme, for eg. RamBda's compose according to benchmark result in the readme is 93.76% faster, but when I did a benchmark using benchmark.js the results of Ramda and RamBda were not much different
here is the snippet of the test suite:
const Benchmark = require("benchmark");
const Ra = require("ramda");
const Rb = require("rambda");
const classyGreeting = (firstName, lastName) =>
"The name's " + lastName + ", " + firstName + " " + lastName;
const raYellGreeting = Ra.compose(Ra.toUpper, Ra.toLower, Ra.toUpper, classyGreeting);
const rbYellGreeting = Rb.compose(Ra.toUpper, Ra.toLower, Ra.toUpper, classyGreeting);
var suite = new Benchmark.Suite();
suite
.add("Ramda compose", function () {
raYellGreeting("James", "Bond");
})
.add("RamBda compose", function () {
rbYellGreeting("James", "Bond");
})
.on("cycle", function (event) {
console.log(String(event.target));
})
.on("complete", function () {
console.log("Fastest is ", this.filter("fastest").map("name"));
})
// run async
.run({ async: true });
output:
Ramda compose x 702,214 ops/sec ±2.08% (85 runs sampled)
RamBda compose x 739,388 ops/sec ±1.33% (88 runs sampled)
Fastest is [ 'RamBda compose' ]
Hi,
I did the benchmarking using benchmark.js(which is a reliable benchmarking library) and the results were not same as mentioned in the readme, for eg. RamBda's
composeaccording to benchmark result in the readme is 93.76% faster, but when I did a benchmark using benchmark.js the results of Ramda and RamBda were not much differenthere is the snippet of the test suite:
output: