monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: [PATCH] monotone ls authors


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Re: [PATCH] monotone ls authors
Date: Thu, 15 Dec 2005 15:33:19 -0800
User-agent: Mutt/1.5.9i

On Thu, Dec 15, 2005 at 09:33:45AM -0800, Steven E. Harris wrote:
> Nathaniel Smith <address@hidden> writes:
> 
> > It's completely against the idiom,
> 
> What idiom? It's idiomatic in our house style here.

The one used throughout the monotone code, then.  (And all other C++
I've happened to come across, but that's tangential :-).)

> > and does _not_ improve performance.  (end() is inlined anyway!)
> 
> Even if so, you're inlining something that looks like this
> 
> ,----
> | iterator end()
> |   {
> |   return (iterator(_Mylast));
> |   }
> `----
> 
> (constructing a spurious temporary) on every termination
> test. Inlining may save call overhead but says nothing about
> eliminating operations.

Compilers are allowed to eliminate temporaries, hoist repeated options
out of loops, etc., too, and I would be reasonably shocked if g++
couldn't in this case (though I haven't verified).

We can make code longer and harder to read, and spend time enforcing
this, _after_ there's evidence that this makes any measurable
difference and is a hot-spot :-).

-- Nathaniel

-- 
Details are all that matters; God dwells there, and you never get to
see Him if you don't struggle to get them right. -- Stephen Jay Gould




reply via email to

[Prev in Thread] Current Thread [Next in Thread]