← Back to team overview

yade-dev team mailing list archive

Re: Note on optimized compilation / optimized coding / profiling results

 

Václav S(milauer said:     (by the date of Fri, 22 Feb 2008 08:06:34 +0100)

> > "Premature optimization is the root of all evil".
> >   
> Last time I had flu and headache it was not because of premature
> optimization. If that is not "evil", consider 2nd world war, which was
> not caused by premature optimization either.

Hitler was optimizing the human race :-)

  http://en.wikipedia.org/wiki/Godwin's_law

Man, this was quick :^)


> Janek, is multi_index random-access in O(1)? That is important if we try
> to use openMP, which can parallelize some loops by itself.

yes, of course. Every action has constant time. No matter if you have
only 100 or 10^10 elements, the time to access 50th element consumes
the same constant amount of time. You could have a look at my
concerns about this in that boost mailing list thread (which I linked
from Development_schedule on wiki)

http://lists.boost.org/Archives/boost/2007/07/124768.php

specifically here:

http://lists.boost.org/Archives/boost/2007/07/124868.php

Author of boost::multi_index writes: "Indices are hashed so as to
provide constant time lookup complexities."


-- 
Janek Kozicki                                                         |
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev



Follow ups

References