crlib: replace random number generator with wyhash.

Benchmarks shows about 4x increased PRNG perfomance increase comparing to old one. Should slightly reduce per-bot CPU usage.
This commit is contained in:
ds 2020-09-29 19:23:26 +03:00
commit 726ea72965
13 changed files with 189 additions and 179 deletions

View file

@ -443,7 +443,7 @@ public:
if (boundarySlash != String::InvalidIndex) {
boundaryName = localPath.substr (boundarySlash + 1);
}
StringRef boundaryLine = strings.format ("---crlib_upload_boundary_%d%d%d%d", rg.int_ (0, 9), rg.int_ (0, 9), rg.int_ (0, 9), rg.int_ (0, 9));
StringRef boundaryLine = strings.format ("---crlib_upload_boundary_%d%d%d%d", rg.get (0, 9), rg.get (0, 9), rg.get (0, 9), rg.get (0, 9));
String request, start, end;
start.appendf ("--%s\r\n", boundaryLine);