BackburnerJS / backburner.js

A rewrite of the Ember.js run loop as a generic microlibrary
MIT License
392 stars 80 forks source link

Add benchmark for "normal" schedule and flush. #312

Closed rwjblue closed 6 years ago

rwjblue commented 6 years ago

Add benchmark for "normal" schedule and flush. Also tests DEBUG vs non-DEBUG versions (to get an idea of the performance trade-offs).

Output at the moment:

- Schedule & Flush - function
- Schedule & Flush - target, function
- Schedule & Flush - target, string method name
- Schedule & Flush - target, string method name, 1 argument
- Schedule & Flush - target, string method name, 2 arguments
- DEBUG - Schedule & Flush - function
- DEBUG - Schedule & Flush - target, function
- DEBUG - Schedule & Flush - target, string method name
- DEBUG - Schedule & Flush - target, string method name, 1 argument
- DEBUG - Schedule & Flush - target, string method name, 2 arguments
running first test, please wait...
 Schedule & Flush - function .............................................
561,518.02 op/s
 Schedule & Flush - target, function .....................................
489,466.23 op/s
 Schedule & Flush - target, string method name ...........................
439,886.83 op/s
 Schedule & Flush - target, string method name, 1 argument ...............
463,977.73 op/s
 Schedule & Flush - target, string method name, 2 arguments ..............
487,001.40 op/s
 DEBUG - Schedule & Flush - function .....................................
119,106.06 op/s
 DEBUG - Schedule & Flush - target, function .............................
119,205.05 op/s
 DEBUG - Schedule & Flush - target, string method name ...................
120,961.27 op/s
 DEBUG - Schedule & Flush - target, string method name, 1 argument .......
113,748.35 op/s
 DEBUG - Schedule & Flush - target, string method name, 2 arguments ......
113,232.08 op/s fastest: Schedule & Flush - function