[Top][All Lists]

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

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

From: Steven E. Harris
Subject: [Monotone-devel] Re: [PATCH] monotone ls authors
Date: Thu, 15 Dec 2005 09:33:45 -0800
User-agent: Gnus/5.110004 (No Gnus v0.4) XEmacs/21.4.13 (cygwin32)

Nathaniel Smith <address@hidden> writes:

> It's completely against the idiom,

What idiom? It's idiomatic in our house style here.

> uglifies the code,

Yes, perhaps.

> 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.

Maybe it's not worth worrying over a small difference here, but in our
own code base here we would flag the repeated end() check in a code
review and require it to be changed. Apparently idioms are less common
than we assume.

Steven E. Harris

reply via email to

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