Skip to content

Commit

Permalink
chore(perf): fix RxJS 3 flatMap calls
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Sep 19, 2015
1 parent 49484a2 commit 5cbfd77
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var RxNew = require("../../../../index");

module.exports = function (suite) {

var oldMergeMapWithCurrentThreadScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread).mergeMap(RxOld.Observable.return(0, RxOld.Scheduler.currentThread));
var oldMergeMapWithCurrentThreadScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread).flatMap(RxOld.Observable.return(0, RxOld.Scheduler.currentThread));
var newMergeMapWithCurrentThreadScheduler = RxNew.Observable.range(0, 25, RxNew.Scheduler.immediate).mergeMapTo(RxNew.Observable.of(0, RxNew.Scheduler.immediate));

return suite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var RxNew = require("../../../../index");

module.exports = function (suite) {

var oldMergeMapWithCurrentThreadScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread).mergeMap(RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread));
var oldMergeMapWithCurrentThreadScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread).flatMap(RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread));
var newMergeMapWithCurrentThreadScheduler = RxNew.Observable.range(0, 25, RxNew.Scheduler.immediate).mergeMapTo(RxNew.Observable.range(0, 25, RxNew.Scheduler.immediate));

return suite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var RxNew = require("../../../../index");

module.exports = function (suite) {

var oldMergeMapWithCurrentThreadScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread).mergeMap(function (x) { return RxOld.Observable.return(x, RxOld.Scheduler.currentThread); });
var oldMergeMapWithCurrentThreadScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread).flatMap(function (x) { return RxOld.Observable.return(x, RxOld.Scheduler.currentThread); });
var newMergeMapWithCurrentThreadScheduler = RxNew.Observable.range(0, 25, RxNew.Scheduler.immediate).mergeMap(function (x) { return RxNew.Observable.of(x); });

return suite
Expand Down
2 changes: 1 addition & 1 deletion perf/micro/current-thread-scheduler/operators/merge-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var RxNew = require("../../../../index");

module.exports = function (suite) {

var oldMergeMapWithCurrentThreadScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread).mergeMap(function (x) { return RxOld.Observable.range(x, 25, RxOld.Scheduler.currentThread); });
var oldMergeMapWithCurrentThreadScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.currentThread).flatMap(function (x) { return RxOld.Observable.range(x, 25, RxOld.Scheduler.currentThread); });
var newMergeMapWithCurrentThreadScheduler = RxNew.Observable.range(0, 25, RxNew.Scheduler.immediate).mergeMap(function (x) { return RxNew.Observable.range(x, 25, RxNew.Scheduler.immediate); });

return suite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var RxNew = require("../../../../index");

module.exports = function (suite) {

var oldMergeMapWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate).mergeMap(RxOld.Observable.return(0, RxOld.Scheduler.immediate));
var oldMergeMapWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate).flatMap(RxOld.Observable.return(0, RxOld.Scheduler.immediate));
var newMergeMapWithImmediateScheduler = RxNew.Observable.range(0, 25).mergeMapTo(RxNew.Observable.of(0));

return suite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var RxNew = require("../../../../index");

module.exports = function (suite) {

var oldMergeMapWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate).mergeMap(RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate));
var oldMergeMapWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate).flatMap(RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate));
var newMergeMapWithImmediateScheduler = RxNew.Observable.range(0, 25).mergeMapTo(RxNew.Observable.range(0, 25));

return suite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var RxNew = require("../../../../index");

module.exports = function (suite) {

var oldMergeMapWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate).mergeMap(function (x) { return RxOld.Observable.return(x, RxOld.Scheduler.immediate); });
var oldMergeMapWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate).flatMap(function (x) { return RxOld.Observable.return(x, RxOld.Scheduler.immediate); });
var newMergeMapWithImmediateScheduler = RxNew.Observable.range(0, 25).mergeMap(function (x) { return RxNew.Observable.of(x); });

return suite
Expand Down
2 changes: 1 addition & 1 deletion perf/micro/immediate-scheduler/operators/merge-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var RxNew = require("../../../../index");

module.exports = function (suite) {

var oldMergeMapWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate).mergeMap(function (x) { return RxOld.Observable.range(x, 25, RxOld.Scheduler.immediate); });
var oldMergeMapWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate).flatMap(function (x) { return RxOld.Observable.range(x, 25, RxOld.Scheduler.immediate); });
var newMergeMapWithImmediateScheduler = RxNew.Observable.range(0, 25).mergeMap(function (x) { return RxNew.Observable.range(x, 25); });

return suite
Expand Down

0 comments on commit 5cbfd77

Please sign in to comment.