Yes, something I just realized, makes it more difficult to optimize it.


On Wed, Jan 15, 2014 at 3:42 PM, Matt T. Proud <notifications@github.com>wrote:

> In bench/simple.rb:
>
> > +  # profile message creation/encoding/decoding w/ ruby-prof
> > +  # works on 1.8 and 1.9
> > +  #   ruby bench/simple.rb ruby-prof
> > +  #   open bench/beefcake.prof.html
> > +
> > +  require 'ruby-prof'
> > +  result = RubyProf.profile do
> > +    ITERS.times do
> > +      str = MyMessage.new(
> > +        :number => 12345,
> > +        :chars  => 'hello',
> > +        :raw    => 'world',
> > +        :bool   => true,
> > +        :float  => 1.2345
> > +      ).encode
> > +      MyMessage.decode(str)
>
> I would also decouple the encoding/decoding benchmarks from each other.
> Might be more beneficial.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/protobuf-ruby/beefcake/pull/45/files#r8897524>
> .
>