
On Sat, Apr 18, 2009 at 1:26 AM, er
Marco Guazzone wrote:
This would be a good starting point, even if the resulting code might be penalized in performance and resource consumption (e.g., for the
... and here it is :
...
std::generate_n(back_inserter(vec),nn,random::make_variate_generator(urng,dexp)); //t2 ... std::generate_n(back_inserter(vec),nn,gen_t(urng,rexp));//t3
time per 1000000 iterations : t0 = 1.54508 t1 = 1.49743 t2 = 5.95946 t3 = 5.91909
Just tried and yessss you're right: t2 ~ 14.70 t3 ~ 14.68 (compiler: g++ with flags: -DNDEBUG -O3 -Wall -ansi -pedantic) Also, differences in memory consumption seem negligible Many thanks for your useful hint!!! But there is a hope that a "rand" function is added to boost::math in order to bridge the two worlds? Thank you so much! Cheers -- Marco
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users