--User changes

-Improve performance in the following variations: cpow2, dc_cube, julia3d, julia3dz, julian2, log_db, nblur, npolar, waffle, wavesn, xtrb.

--Code changes
 -Rand range now uses multiply + shift rather than modulo.
This commit is contained in:
Person
2019-07-24 18:29:33 -07:00
parent 1cafbb8837
commit 4a150132e1
9 changed files with 108 additions and 66 deletions

View File

@ -1078,11 +1078,11 @@ public:
};
if (rand.Rand() & 1)
sym = symDistrib[rand.Rand() % Vlen(symDistrib)];
sym = symDistrib[rand.Rand(Vlen(symDistrib))];
else if (rand.Rand() & 31)
sym = intmax_t(rand.Rand() % 13) - 6;
sym = intmax_t(rand.Rand(13)) - 6;
else
sym = intmax_t(rand.Rand() % 51) - 25;
sym = intmax_t(rand.Rand(51)) - 25;
}
if (sym == 1 || sym == 0)