[patch] kio remaining time

David Faure faure at kde.org
Mon Jan 31 12:17:40 GMT 2005


On Monday 31 January 2005 09:41, Martin Koller wrote:
> On Sunday 30 January 2005 23:26, David Faure wrote:
> > On Sunday 30 January 2005 22:50, Martin Koller wrote:
> > > I'm thinking that it would not change the compilers behaviour here - but
> > > I'm not a compiler guru ...
> >
> > ???
> > Try compiling "const int i = 4; i = 5;"
> > with and without the const, to see if the "const" changes the compiler's
> > behavior. It obviously does :)
> 
> That's obvious, but I was speaking about performance of the resulting code.

The performance is exactly the same with the const int example, but is
different in the QValueList example, due to the implicit detach() when the 
container isn't const, as explained on that "programming mistakes" page.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list