Regional innovation. World-class connections

Get inspired with Sunderland Software City's email newsletter

View current issue

Ask us a Question

Question

After profiling a large game playing program, I have found that the library function rand() is consuming a considerable fraction of the total processing time. My requirements for the random number generator are not very onerous - its not important that it pass a great battery of statistical tests of pure randomness. I just want something cheap and cheerful that is very fast. Any suggestions?
Posted by on June 16, 2010
Answer: There are few algorithms in common use that are faster than an LCG (which is very, very likely what rand() is using). You may want to try Marsaglia's Xorshift generator which is pretty fast (depending on the hardware). The WELL512a generator is also quite fast (more so than MT19937 or MT19937-64).
What are the eligibility criteria for joining the Software Ventures programme? Msycdo commenced trading in February 2010 and is in the process of developing software modules, see www.msycdo.co.uk. Would the company be eligible to join the programme and if so how?
Posted by on August 18, 2010

You must be logged in to ask questions

Back to top

Sunderland Software City
Enterprise Park East, Sunderland SR5 2TA, United Kingdom

Site by SUMO