I hereby claim:
- I am abrandoned on github.
- I am abrandoned (https://keybase.io/abrandoned) on keybase.
- I have a public key ASDxXi04uTExCvJyh0yj4-QmG5XN-zDhBKPtov1yiZ3v9Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
[7] pry(Protobuf::Field::VarintField)> Benchmark.measure do | |
[7] pry(Protobuf::Field::VarintField)* 100_000.times do | |
[7] pry(Protobuf::Field::VarintField)* encode(512) | |
[7] pry(Protobuf::Field::VarintField)* end | |
[7] pry(Protobuf::Field::VarintField)* end | |
=> #<Benchmark::Tms:0x7813cb11 | |
@cstime=0.0, | |
@cutime=0.0, | |
@label="", | |
@real=0.04975465498864651, |
*** Dumping jruby_802.setPosition *** | |
L0 | |
ALOAD 0 | |
LDC "jruby_802.rb" | |
ILOAD 1 | |
INVOKEVIRTUAL org/jruby/runtime/ThreadContext.setFileAndLine (Ljava/lang/String;I)V | |
RETURN | |
*** Dumping jruby_802.__file__ *** | |
L0 | |
ALOAD 0 |
1.9.3p374 :001 > require 'benchmark' | |
=> true | |
1.9.3p374 :002 > Benchmark.bm(7) do |bm| | |
1.9.3p374 :003 > bm.report("flatten") { 1_000_000.times { [1, 2, 3, nil, nil, nil, 3, 2, 1].flatten }} | |
1.9.3p374 :004?> bm.report("flatten!") { 1_000_000.times { [1, 2, 3, nil, nil, nil, 3, 2, 1].flatten! }} | |
1.9.3p374 :005?> bm.report("compact") { 1_000_000.times { [1, 2, 3, nil, nil, nil, 3, 2, 1].compact }} | |
1.9.3p374 :006?> bm.report("compact!") { 1_000_000.times { [1, 2, 3, nil, nil, nil, 3, 2, 1].compact! }} | |
1.9.3p374 :007?> bm.report("uniq") { 1_000_000.times { [1, 2, 3, nil, nil, nil, 3, 2, 1].uniq }} | |
1.9.3p374 :008?> bm.report("uniq!") { 1_000_000.times { [1, 2, 3, nil, nil, nil, 3, 2, 1].uniq! }} | |
1.9.3p374 :009?> end |
module HTTParrot | |
class Config | |
@config = OpenStruct.new | |
def self.configure | |
yield self | |
end | |
def self.config | |
@config.instance_variable_get(:@table) |