Re: Acting on 'Things we do wrong. Part III.'

2007-08-30 Thread Abdelrazak Younes
Andre Poenitz wrote: On Thu, Aug 30, 2007 at 06:50:25PM +0200, Abdelrazak Younes wrote: Andre Poenitz wrote: On Thu, Aug 30, 2007 at 08:59:19AM +0200, Abdelrazak Younes wrote: Andre Poenitz wrote: I am tempted to commit the attached patch. Shaves ~22s off a release build, i.e. roughly 1.2% of

Re: Acting on 'Things we do wrong. Part III.'

2007-08-30 Thread Andre Poenitz
On Thu, Aug 30, 2007 at 06:50:25PM +0200, Abdelrazak Younes wrote: > Andre Poenitz wrote: > >On Thu, Aug 30, 2007 at 08:59:19AM +0200, Abdelrazak Younes wrote: > >>Andre Poenitz wrote: > >>>I am tempted to commit the attached patch. Shaves ~22s off a release > >>>build, i.e. roughly 1.2% of total t

Re: Acting on 'Things we do wrong. Part III.'

2007-08-30 Thread Abdelrazak Younes
Andre Poenitz wrote: On Thu, Aug 30, 2007 at 08:59:19AM +0200, Abdelrazak Younes wrote: Andre Poenitz wrote: I am tempted to commit the attached patch. Shaves ~22s off a release build, i.e. roughly 1.2% of total time. Not exactly much, but a dozen of such trivial changes will show... Couldn't

Re: Acting on 'Things we do wrong. Part III.'

2007-08-30 Thread Andre Poenitz
On Thu, Aug 30, 2007 at 08:59:19AM +0200, Abdelrazak Younes wrote: > Andre Poenitz wrote: > >I am tempted to commit the attached patch. Shaves ~22s off a release > >build, i.e. roughly 1.2% of total time. Not exactly much, but a dozen of > >such trivial changes will show... > > Couldn't we just re

Re: Acting on 'Things we do wrong. Part III.'

2007-08-30 Thread Abdelrazak Younes
Andre Poenitz wrote: I am tempted to commit the attached patch. Shaves ~22s off a release build, i.e. roughly 1.2% of total time. Not exactly much, but a dozen of such trivial changes will show... Couldn't we just remove clone() and implement a copy operator instead? The instantiation will happ

Re: Acting on 'Things we do wrong. Part III.'

2007-08-29 Thread Andre Poenitz
On Wed, Aug 29, 2007 at 08:25:15PM -0400, Richard Heck wrote: > Andre Poenitz wrote: > >On Wed, Aug 29, 2007 at 06:57:47PM -0400, Richard Heck wrote: > > > >>Andre Poenitz wrote: > >> > >>>I am tempted to commit the attached patch. Shaves ~22s off a release > >>>build, i.e. roughly 1.2% of to

Re: Acting on 'Things we do wrong. Part III.'

2007-08-29 Thread Richard Heck
Andre Poenitz wrote: On Wed, Aug 29, 2007 at 06:57:47PM -0400, Richard Heck wrote: Andre Poenitz wrote: I am tempted to commit the attached patch. Shaves ~22s off a release build, i.e. roughly 1.2% of total time. Not exactly much, but a dozen of such trivial changes will show...

Re: Acting on 'Things we do wrong. Part III.'

2007-08-29 Thread John Levon
On Thu, Aug 30, 2007 at 12:51:29AM +0200, Andre Poenitz wrote: > I am tempted to commit the attached patch. Shaves ~22s off a release > build, i.e. roughly 1.2% of total time. Not exactly much, but a dozen of > such trivial changes will show... Your rationale is pretty compelling but this should

Re: Acting on 'Things we do wrong. Part III.'

2007-08-29 Thread Andre Poenitz
On Wed, Aug 29, 2007 at 06:57:47PM -0400, Richard Heck wrote: > Andre Poenitz wrote: > >I am tempted to commit the attached patch. Shaves ~22s off a release > >build, i.e. roughly 1.2% of total time. Not exactly much, but a dozen of > >such trivial changes will show... > > Do we know why auto_pt

Things we do wrong. Part III.

2007-08-29 Thread Andre Poenitz
Bad news from the Ivory Tower, part III. --- snip --- #!/bin/bash n=100 # number of classes m=1000 # number of cycles cc=/usr/bin/g++ function useit() { time for i in $s ; do $cc -c $i.cpp ; done echo ".cpp: `cat

Re: Things we do wrong

2007-08-28 Thread Andre Poenitz
On Wed, Aug 29, 2007 at 10:06:40AM +1000, Roger Mc Murtrie wrote: > In this whole lengthy diatribe, nobody seems to mention the words > "good programming practice"; Nobody mentioned the word "butter" either, yet I would not think it died with C++. > perhaps it died with C++? Programing standar

Re: Things we do wrong

2007-08-28 Thread Roger Mc Murtrie
for highly unmaintable code. Roger On 29/08/2007, at 1:13 AM, [EMAIL PROTECTED] wrote: Re: Things we do wrong

Re: Things we do wrong

2007-08-28 Thread Andre Poenitz
On Tue, Aug 28, 2007 at 04:34:40PM +0100, José Matos wrote: > On Tuesday 28 August 2007 15:45:15 Helge Hafting wrote: > > That's a really stupid argument.  Thw word "static" has too many meanings, > > so lets disable some of them ???  The sane thing would be a > > clean rename from "static" to seve

Re: Things we do wrong

2007-08-28 Thread José Matos
On Tuesday 28 August 2007 15:45:15 Helge Hafting wrote: > That's a really stupid argument.  Thw word "static" has too many meanings, > so lets disable some of them ???  The sane thing would be a > clean rename from "static" to several new keywords - one for each > use.  And to keep the existing nic

Re: Things we do wrong

2007-08-28 Thread Andre Poenitz
On Tue, Aug 28, 2007 at 12:45:57PM +0200, Tommaso Cucinotta wrote: > Infact, a few weeks ago, I was told LyX were using unnamed > namespaces instead of statics, so I've got to the usual > TIC++vone.pdf, where it says: > > "If you put local names in an unnamed namespace, you don’t > need to give th

Re: Things we do wrong

2007-08-28 Thread Andre Poenitz
On Tue, Aug 28, 2007 at 10:33:31AM +0200, Abdelrazak Younes wrote: > Andre Poenitz wrote: > >Of course it's a somewhat pathological example and we won't suddenly > >compile 7 times faster within 1/146 diskspace when we kick anon > >namespaces out. But the direction is clear... > > That would be ve

Re: Things we do wrong

2007-08-28 Thread Andre Poenitz
On Tue, Aug 28, 2007 at 02:33:23AM +, Angus Leeming wrote: > Andre Poenitz <[EMAIL PROTECTED]> writes: > > So anybody who remembers the reasons to use the anon namespace (for > > _functions_)? [Rhetorical question...] > > I seem to remember that Lars told us that it was "a good thing" (TM). >

Re: Things we do wrong

2007-08-28 Thread Helge Hafting
Tommaso Cucinotta wrote: [...] the new C++ Standard reads in section 7.3.1.1 Unnamed Spaces, paragraph 2: "The use of the static keyword is deprecated when declaring objects in a namespace scope, the unnamed namespace provides a superior alternative." Superior how - is the question. If all

Re: Things we do wrong

2007-08-28 Thread Tommaso Cucinotta
Infact, a few weeks ago, I was told LyX were using unnamed namespaces instead of statics, so I've got to the usual TIC++vone.pdf, where it says: "If you put local names in an unnamed namespace, you don’t need to give them internal linkage by making them static. C++ deprecates the use of file stat

Re: Things we do wrong

2007-08-28 Thread Abdelrazak Younes
Andre Poenitz wrote: Of course it's a somewhat pathological example and we won't suddenly compile 7 times faster within 1/146 diskspace when we kick anon namespaces out. But the direction is clear... That would be very fine with me but Lars would be displeased I guess... Using the static keyboa

Re: Things we do wrong

2007-08-27 Thread Angus Leeming
Andre Poenitz <[EMAIL PROTECTED]> writes: > So anybody who remembers the reasons to use the anon namespace (for > _functions_)? [Rhetorical question...] I seem to remember that Lars told us that it was "a good thing" (TM). However, before anyone indulges in a "let's bash Lars bit of nostalgia", h

Things we do wrong

2007-08-27 Thread Andre Poenitz
Given that yonder longish list of Things That Go Wrong In LyX is hard to keep in mind while aging I thought I might share this little gem with you. Bad news from the ivory tower part II (Anon namespace vs 'static'): Compare namespace { int fooX() { return X; } } with static int fooX() { r