P
PWalker
Hi, I have written code that I would like to optimize. I need to push it to
the limit interms of speed as the accuracy of results are proportional to
runtime.
First off, would anyone know any resources that explains how to optimize
code i.e. give some rules on c++ optimization? e.g. using memcpy to copy an
array (which i have done).
Also, what is the best sorting algorithm out there for sorting an array of
of size 100 or less? I have considered heapsort and insertsort. I am however
wanting to find the fastest.
Also I'm looking for a good fast random number generator. I am currently
using Boost:
boost::minstd_rand
boost::uniform_real<>
boost::uniform_int<>
boost::variate_generator<boost::minstd_rand, boost::uniform_real<> >
boost::variate_generator<boost::minstd_rand, boost::uniform_int<> >
Is the Mersenne-Twister RNG faster/better?
I am running VC++ 7 on an AMD Mobile XP 2600+ if that helps.
Thanks!
Cheers,
Peter
the limit interms of speed as the accuracy of results are proportional to
runtime.
First off, would anyone know any resources that explains how to optimize
code i.e. give some rules on c++ optimization? e.g. using memcpy to copy an
array (which i have done).
Also, what is the best sorting algorithm out there for sorting an array of
of size 100 or less? I have considered heapsort and insertsort. I am however
wanting to find the fastest.
Also I'm looking for a good fast random number generator. I am currently
using Boost:
boost::minstd_rand
boost::uniform_real<>
boost::uniform_int<>
boost::variate_generator<boost::minstd_rand, boost::uniform_real<> >
boost::variate_generator<boost::minstd_rand, boost::uniform_int<> >
Is the Mersenne-Twister RNG faster/better?
I am running VC++ 7 on an AMD Mobile XP 2600+ if that helps.
Thanks!
Cheers,
Peter