voxelinc / voxellancer

A Game about Voxels in Space
http://voxellancer.chrdw.de
14 stars 2 forks source link

RandomPool for EngineTrail #451

Closed mrzzzrm closed 10 years ago

mrzzzrm commented 10 years ago

VoxelExplosionGenerator::spawn() is at 20% for me in a quite GameScenario because of the rand() calls

xchrdw commented 10 years ago

funny, I checked it in the profiler too and for windows there is no problem with rand()

mrzzzrm commented 10 years ago

would it hurt to have a RP anyway?

xchrdw commented 10 years ago

no ;)

xchrdw commented 10 years ago

or how about using a faster random generator? http://de.wikipedia.org/wiki/Xorshift

xchrdw commented 10 years ago

at least when I tried to "optimize" sin()/cos() calls with precalculated values it wasn't faster because of the memory speed.