event_emitter
event_emitter copied to clipboard
emit speed up
ruby 2.0.0-p0 (2013-02-24) [x86_64-darwin12.3.0]
user system total real
100Kon_1emit 2.910000 0.110000 3.020000 ( 3.268702)
1Kon_1Kemit 5.290000 0.030000 5.320000 ( 5.593177)
1on_100Kemit 0.830000 0.010000 0.840000 ( 0.884736)
ruby 1.9.3-p392 (2013-02-22) [x86_64-darwin12.3.0]
user system total real
100Kon_1emit 2.500000 0.110000 2.610000 ( 2.744506)
1Kon_1Kemit 4.610000 0.020000 4.630000 ( 4.828477)
1on_100Kemit 0.840000 0.010000 0.850000 ( 0.909776)
ruby 1.9.2-p320 (2012-04-20) [x86_64-darwin12.3.0]
user system total real
100Kon_1emit 2.440000 0.110000 2.550000 ( 2.688111)
1Kon_1Kemit 4.820000 0.030000 4.850000 ( 5.053036)
1on_100Kemit 0.690000 0.010000 0.700000 ( 0.751837)
ruby 1.8.7-p371 (2012-10-12) [i686-darwin12.3.0]
user system total real
100Kon_1emit 6.360000 0.470000 6.830000 ( 7.210291)
1Kon_1Kemit 9.590000 0.040000 9.630000 ( 10.141170)
1on_100Kemit 1.730000 0.000000 1.730000 ( 1.789773)
ruby 1.9.3-p385 (2013-02-21) [java]
user system total real
100Kon_1emit 6.330000 0.190000 6.520000 ( 4.425000)
1Kon_1Kemit 5.540000 0.050000 5.590000 ( 5.412000)
1on_100Kemit 0.990000 0.010000 1.000000 ( 1.052000)
use Hash instead of Array
ruby 2.0.0-p0 (2013-02-24) [x86_64-darwin12.3.0]
user system total real
100Kon_1emit 3.130000 0.120000 3.250000 ( 3.521551)
1Kon_1Kemit 3.770000 0.040000 3.810000 ( 4.099890)
1on_100Kemit 0.790000 0.000000 0.790000 ( 0.815189)
ruby 1.8.7-p371 (2012-10-12) [i686-darwin12.3.0]
user system total real
100Kon_1emit 8.490000 0.570000 9.060000 ( 10.294411)
1Kon_1Kemit 6.010000 0.030000 6.040000 ( 6.761206)
1on_100Kemit 1.900000 0.020000 1.920000 ( 2.055817)
use 2 Hashes (type, id)
ruby 2.0.0-p0 (2013-02-24) [x86_64-darwin12.3.0]
user system total real
100Kon_1emit 3.610000 0.130000 3.740000 ( 3.945285)
1Kon_1Kemit 3.780000 0.040000 3.820000 ( 4.087325)
1on_100Kemit 0.700000 0.010000 0.710000 ( 0.764164)
ruby 1.8.7-p371 (2012-10-12) [i686-darwin12.3.0]
user system total real
100Kon_1emit 9.640000 0.550000 10.190000 ( 10.085752)
1Kon_1Kemit 5.340000 0.030000 5.370000 ( 5.743721)
1on_100Kemit 1.580000 0.010000 1.590000 ( 1.748632)