Commit Graph

8 Commits

Author SHA1 Message Date
Karoy Lorentey
8944591e71 [benchmark] Simplify benchmark registration 2021-09-15 22:08:08 -07:00
Karoy Lorentey
8910b75cfe [benchmark] Stop capitalizing function and variable names 2021-09-15 22:08:07 -07:00
Pavol Vaskovic
8cb61308e9 [benchmark] RandomShuffle Legacy Factor 2019-01-22 09:26:05 +01:00
Pavol Vaskovic
524de6bec3 [benchmark] Fix setup overhead in RandomShuffle
RandomShuffleLCG2 had setup overhead of 902 μs (17%) even though it already used the setUpFunction. Turns out that copying 100k element array is measurably costly.

The only way to eliminate this overhead from measurement I could think of is to let the numbersLCG array linger around (800 kB), because shuffling the IOU version had different performance.
2018-10-23 23:29:00 +02:00
Erik Eckstein
f1afba1ad1 benchmarks: adapted some iteration counts and/or workload sizes for benchmarks.
Those are benchmarks which took way too long or short to execute a single iteration or benchmarks which changed in time anyway because of previous fixes.

I renamed those benchmarks so that they are now treated as "new" benchmarks.
2018-07-24 20:20:23 -07:00
Erik Eckstein
f6c24a05cc benchmarks: extract setup code into the setUpFunction in some benchmarks where setup time is significant 2018-07-24 20:20:23 -07:00
Ben Rimmington
b65d0c1d11 Consolidate _stdlib_random functions (#2)
* Use the `__has_include` and `GRND_RANDOM` macros

* Use `getentropy` instead of `getrandom`

* Use `std::min` from the <algorithm> header

* Move `#if` out of the `_stdlib_random` function

* Use `getrandom` with "/dev/urandom" fallback

* Use `#pragma comment` to import "Bcrypt.lib"

* <https://docs.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp>
* <https://clang.llvm.org/docs/UsersManual.html#microsoft-extensions>

* Use "/dev/urandom" instead of `SecRandomCopyBytes`

* Use `swift::StaticMutex` for shared "/dev/urandom"

* Add `getrandom_available`; use `O_CLOEXEC` flag

Add platform impl docs

Update copyrights

Fix docs

Add _stdlib_random test

Update _stdlib_random test

Add missing &

Notice about _stdlib_random

Fix docs

Guard on upperBound = 0

Test full range of 8 bit integers

Remove some gyb

Clean up integerRangeTest

Remove FixedWidthInteger constraint

Use arc4random universally

Fix randomElement

Constrain shuffle to RandomAccessCollection

warning instead of error

Move Apple's implementation

Fix failing test on 32 bit systems
2018-05-09 00:21:44 -05:00
Nate Cook
f146d17214 Revise documentation, add benchmarks (#3)
* [stdlib] Revise documentation for new random APIs

* [stdlib] Fix constraints on random integer generation

* [test] Isolate failing Random test

* [benchmark] Add benchmarks for new random APIs

Fix Float80 test

Value type generators

random -> randomElement

Fix some docs

One more doc fix

Doc fixes & bool fix

Use computed over explicit
2018-05-04 21:03:50 -05:00