On Tue, Oct 15, 2013 at 1:44 PM, Gagle <[email protected]> wrote:
> Why? Any major changes? Have you introduced additional nextTick or
> setImmediate calls?
>
> CODE
>
> "use strict";
>
> var events = require ("events");
> var util = require ("util");
> var speedy = require ("../lib");
>
> var Emitter = function (){
>     events.EventEmitter.call (this);
> };
>
> util.inherits (Emitter, events.EventEmitter);
>
> Emitter.prototype.ping = function (){
>     this.emit ("ping");
> };
>
> var emitter = new Emitter ();
>
> speedy.run ({
>     emitter: function (done){
>         emitter.once ("ping", done);
>         emitter.ping ();
>     }
> });
>
> RESULT v0.10.13 (node.exe binary on windows 7 x64)
>
> File: emitter-vs-callback.js
>
> Node v0.10.13
> V8 v3.14.5.9
> Speedy v0.1.0
>
> Benchmarks: 2
> Timeout: 1000ms (1s 0ms)
> Samples: 3
> Total time per benchmark: ~3000ms (3s 0ms)
> Total time: ~6000ms (6s 0ms)
>
> Higher is better (ops/sec)
>
> emitter
>   2,062,441 ± 0.5%
>
> Elapsed time: 6054ms (6s 54ms)
>
> RESULT v0.10.20 (node.msi installer on windows x64)
>
> File: emitter-vs-callback.js
>
> Node v0.10.20
> V8 v3.14.5.9
> Speedy v0.1.0
>
> Tests: 2
> Timeout: 1000ms (1s 0ms)
> Samples: 3
> Total time per test: ~3000ms (3s 0ms)
> Total time: ~6000ms (6s 0ms)
>
> Higher is better (ops/sec)
>
> emitter
>   684,655 ± 0.4%
>
> Elapsed time: 6053ms (6s 53ms)

As mks says, that's caused by the revert of commit 0397223 in commit fc6f8a6.

A note on the benchmark numbers: the difference will be less
pronounced in most "serious" programs because the EventEmitter
constructor is often so megamorphic (gets invoked in so many different
contexts) that V8's optimizing compiler doesn't even try anyway.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to