Re: Struct is slow
- From: "Rick DeNatale" <rick.denatale@xxxxxxxxx>
- Date: Wed, 17 Oct 2007 21:16:34 +0900
On 10/17/07, Robert Klemme <shortcutter@xxxxxxxxxxxxxx> wrote:
2007/10/17, Joel VanderWerf <vjoel@xxxxxxxxxxxxxxxxx>:
Sylvain Joyeux wrote:
I'm not sure whether you are familiar with Benchmark#bmbm which does aSure. GC does belong to the mix. Now, if GC is enabled you are not able to
rehearsal - personally I rather not switch off GC since in realistic
situations GC time belongs into the mix. But results are rather
similar:
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 ...
But you have a *lot* invocations and it's highly unlikely that GC runs
during every init. On the other hand, if you allocate a lot of memory
from OS that may slow things down. And this will happen without GC.
Also, IMHO cost of memory GC overhead is also part of the runtime
performance. If you compare two approaches and one allocates a lot
more memory than the other, then GC times belong in the measurement
because in a real application that approach will also lead to
increased GC overhead.
Spot on, IMHO
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
.
- Follow-Ups:
- Re: Struct is slow
- From: Wayne Magor
- Re: Struct is slow
- References:
- Re: Struct is slow
- From: Robert Klemme
- Re: Struct is slow
- From: Sylvain Joyeux
- Re: Struct is slow
- From: Joel VanderWerf
- Re: Struct is slow
- From: Robert Klemme
- Re: Struct is slow
- Prev by Date: Re: equal? versus eql? versus == versus === verus <=>
- Next by Date: Re: A Ruby/Rails bibliography
- Previous by thread: Re: Struct is slow
- Next by thread: Re: Struct is slow
- Index(es):
Relevant Pages
|