HTML Preparation code:
AخA
 
1
<script src='https://cdnjs.cloudflare.com/ajax/libs/rxjs/6.6.2/rxjs.umd.min.js'></script>
Script Preparation code:
 
var source = Array(1000000).fill(1).map((_, i) => Math.random());
Tests:
  • Array

     
    const arrayResult = source
      .map(n => n * 2)
      .filter(n => n > 0.5)
      .reduce((m, c) => Math.max(m, c));
  • RxJs

     
    const transducerResult = rxjs.from(source).pipe(
      rxjs.operators.map(n => n * 2),
      rxjs.operators.filter(n => n > 0.5),
      rxjs.operators.reduce((m, c) => Math.max(m, c))
    ).subscribe(console.log);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array
    RxJs

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Array 27.7 Ops/sec
RxJs 64.7 Ops/sec