Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] CGAL::Random
- Date: Wed, 22 Jun 2011 09:44:37 +0200
- Organization: GeometryFactory
Le mercredi 22 juin 2011 09:17:44, sara Samadi a écrit :
> I havent test your idea yet, but i think it is not important for compiler
> that initialization is in or out of for loop because the compiler
> translate the statement (CGAL::Random random) only one time.
The compiler can optimize and do the memory allocation only once. *But* the
compiler must execute the content of the constructor of Random, and thus
reinitialize the variable, at every iteration of the loop. Have a look at the
constructor of Random, and you will understand why it differs!
--
Laurent Rineau, PhD
Release Manager of the CGAL Project http://www.cgal.org/
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
- [cgal-discuss] CGAL::Random, sara123, 06/21/2011
- Re: [cgal-discuss] CGAL::Random, Sylvain Pion, 06/22/2011
- Re: [cgal-discuss] CGAL::Random, sara Samadi, 06/22/2011
- Re: [cgal-discuss] CGAL::Random, Doug Epps, 06/22/2011
- Re: [cgal-discuss] CGAL::Random, sara Samadi, 06/22/2011
- Re: [cgal-discuss] CGAL::Random, Guillaume Damiand, 06/22/2011
- Re: [cgal-discuss] CGAL::Random, Francois Berenger, 06/22/2011
- Re: [cgal-discuss] CGAL::Random, Laurent Rineau (GeometryFactory), 06/22/2011
- [cgal-discuss] Re: CGAL::Random, sara123, 06/28/2011
- Re: [cgal-discuss] CGAL::Random, sara Samadi, 06/22/2011
- Re: [cgal-discuss] CGAL::Random, Doug Epps, 06/22/2011
- Re: [cgal-discuss] CGAL::Random, sara Samadi, 06/22/2011
- Re: [cgal-discuss] CGAL::Random, Sylvain Pion, 06/22/2011
Archive powered by MHonArc 2.6.16.