Skip to content

Change rand() usage to xor_rand() - increase framerate on intel onboard graphics

Matt Reece Bentley requested to merge (removed):div0-stable into div0-stable

Replaces the slower rand() with the faster xor_rand() - rand() has more statistically gaussian distribution but for anything outside of encryption that doesn't matter. On dedicated video cards I haven't detected a massive difference in terms of framerate, however on onboard intel video this doubles the framerate on arcane dimensions start map (presumably because they're using the CPU for rendering, whereas with a dedicated graphics card there is more leeway on the CPU usage). And hey, less CPU usage is less CPU usage.

srand has also been replaced with xor_srand.

Merge request reports