Re: Struct is slow



I'm not sure whether you are familiar with Benchmark#bmbm which does a
rehearsal - personally I rather not switch off GC since in realistic
situations GC time belongs into the mix. But results are rather
similar:
Sure. GC does belong to the mix. Now, if GC is enabled you are not able to
compare anything. Let's assume that GC runs during 'array init', you will
say 'hey, struct init is faster'. Now, if GC runs during 'struct init' the
result may change ...

Keeping GC is meaningful when benchmarking a whole application. In
microbenchmarks like these, it is simply noise.
--
Sylvain Joyeux

.



Relevant Pages

  • Re: Struct is slow
    ... rehearsal - personally I rather not switch off GC since in realistic ... situations GC time belongs into the mix. ... Let's assume that GC runs during 'array init', you will say 'hey, struct init is faster'. ...
    (comp.lang.ruby)
  • Re: Struct is slow
    ... situations GC time belongs into the mix. ... if GC runs during 'struct init' the ... if you allocate a lot of memory ... IMHO cost of memory GC overhead is also part of the runtime ...
    (comp.lang.ruby)
  • Re: Struct is slow
    ... situations GC time belongs into the mix. ... if GC runs during 'struct init' the ... IMHO cost of memory GC overhead is also part of the runtime ...
    (comp.lang.ruby)