Boost logo

Boost Users :

From: Mike Marchywka (marchywka_at_[hidden])
Date: 2007-10-11 12:56:28


>completely dwarf the loop-control overhead? In production code, how many
>loops do we write with such trivial bodies that the loop-control
>overhead makes a measurable difference?

I was going to comment that cache and memory organiztion usually are most
relevant to real performance but since you mention this, I have run into
counter-examples.
However, these usually can unroll so the loop penalty goes to zero :)
Adding code size optimization request would presumably discourage a compiler
from
trying this.

>From: Nat Goodspeed <nat_at_[hidden]>
>Reply-To: boost-users_at_[hidden]
>To: boost-users_at_[hidden]
>Subject: Re: [Boost-users] Container iteration macro that is equivalent to
>handcoded iteration?
>Date: Thu, 11 Oct 2007 12:48:21 -0400
>
>Erik wrote:
> > Andrew Holden skrev:
> >> Erik wrote:
> >>
> >>> Unfortunately it does not look so good for BOOST_FOREACH after
> >>> this modification. It will increase to 24 instructions, while the
> >>> handcoded is still only 21.
> >>>
> >> Forgive me if this was answered in an earlier post, but how complex
> >> is the loop body, including the complexity of any functions it
> >> calls?
>
> > The answer is available by executing the test script in my previous
> > post and then running the diff command that I showed in that post:
> > The size of the loop body increases from 6 to 7 instructions and the
> > code before the loop increases with 2 instructions.
>
>No, that's not what Andrew asked. He was asking: in a *real* loop in
>your real application, wouldn't the work being done by the loop
>completely dwarf the loop-control overhead? In production code, how many
>loops do we write with such trivial bodies that the loop-control
>overhead makes a measurable difference?
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users

_________________________________________________________________
Capture the missing critters!   Play Search Queries and earn great prizes.
http://club.live.com/search_queries.aspx?icid=sq_hotmailtextlink1_oct


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net