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 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Browser:
Firefox 121
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
Ramda pipe
525481.7 Ops/sec
vanilla JS pipe
1425533.4 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)