Skip to content

Change rand() usage to xor_rand() - increase framerate.

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).

I've replaced the srand too, however this won't work 100% predictably if xor_rand() has already been used, so I may replace this with another function at a later point.

Merge request reports