Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
sumOfEventNumbers-vanilla-vs-rxjs-7
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/122.0.6261.89 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 122
Operating system:
iOS 17.3
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
vanilla
53.2 Ops/sec
rxjs
93.5 Ops/sec
HTML Preparation code:
<script src='https://unpkg.com/rxjs@7.3.0/dist/bundles/rxjs.umd.min.js'></script>
Script Preparation code:
function onlyEven(value) {return value % 2 == 0;} function timesTwo(value) {return value * 2;} function sum(a, b) {return a + b;}
Tests:
vanilla
Array.from(Array(1000000).keys()) .filter(onlyEven) .map(timesTwo) .reduce(sum, 0);
rxjs
let { from } = rxjs; let { filter, map, reduce } = rxjs.operators; from(Array.from(Array(1000000).keys())).pipe( filter(onlyEven), map(timesTwo), reduce(sum, 0) );