Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Ramda pipe vs vanilla JS pipe (v2.0)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Browser:
Chrome 120
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
Ramda pipe
1595925.2 Ops/sec
vanilla JS pipe
1776447.1 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.27.1/ramda.min.js" integrity="sha512-rZHvUXcc1zWKsxm7rJ8lVQuIr1oOmm7cShlvpV0gWf0RvbcJN6x96al/Rp2L2BI4a4ZkT2/YfVe/8YvB2UHzQw==" crossorigin="anonymous"></script>
Script Preparation code:
var data = 2; function funOne(data) { return data + data; } var funTwo = function funTwo(data) { return data * 2; }; var flow = function flow(funcs) { return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return funcs.reduce(function (prev, fnc) { return [fnc.apply(void 0, prev)]; }, args)[0]; }; };
Tests:
Ramda pipe
R.pipe(funOne, funTwo, funOne, funTwo, funOne, funTwo, funOne, funTwo, funOne, funTwo, funOne, funTwo)(data)
vanilla JS pipe
flow([funOne, funTwo, funOne, funTwo, funOne, funTwo, funOne, funTwo, funOne, funTwo, funOne, funTwo])(data)