forked from haskell/random
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate Float and Double via division #118
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Coverage ======== Before: 0.787% of representable Floats in the unit interval reached After: 7.874% of representable Floats in the unit interval reached (A similar enumeration for Double is impossible, but it is very likely that coverage is increased for Doubles too.) Performance =========== Before: pure/random/Float mean 331.1 μs ( +- 21.67 μs ) pure/uniformR/unbounded/Float mean 324.6 μs ( +- 2.849 μs ) pure/random/Double mean 411.3 μs ( +- 5.876 μs ) pure/uniformR/unbounded/Double mean 416.8 μs ( +- 41.93 μs ) After: pure/random/Float mean 27.32 μs ( +- 158.0 ns ) pure/uniformR/unbounded/Float mean 27.37 μs ( +- 422.0 ns ) pure/random/Double mean 27.34 μs ( +- 303.1 ns ) pure/uniformR/unbounded/Double mean 27.49 μs ( +- 983.7 ns )
idontgetoutmuch
approved these changes
Apr 29, 2020
curiousleo
added a commit
that referenced
this pull request
May 13, 2020
* Generate Float and Double via division Coverage ======== Before: 0.787% of representable Floats in the unit interval reached After: 7.874% of representable Floats in the unit interval reached (A similar enumeration for Double is impossible, but it is very likely that coverage is increased for Doubles too.) Performance =========== Before: pure/random/Float mean 331.1 μs ( +- 21.67 μs ) pure/uniformR/unbounded/Float mean 324.6 μs ( +- 2.849 μs ) pure/random/Double mean 411.3 μs ( +- 5.876 μs ) pure/uniformR/unbounded/Double mean 416.8 μs ( +- 41.93 μs ) After: pure/random/Float mean 27.32 μs ( +- 158.0 ns ) pure/uniformR/unbounded/Float mean 27.37 μs ( +- 422.0 ns ) pure/random/Double mean 27.34 μs ( +- 303.1 ns ) pure/uniformR/unbounded/Double mean 27.49 μs ( +- 983.7 ns ) * Floating point ranges inclusive in upper bound
curiousleo
added a commit
that referenced
this pull request
May 13, 2020
* Generate Float and Double via division Coverage ======== Before: 0.787% of representable Floats in the unit interval reached After: 7.874% of representable Floats in the unit interval reached (A similar enumeration for Double is impossible, but it is very likely that coverage is increased for Doubles too.) Performance =========== Before: pure/random/Float mean 331.1 μs ( +- 21.67 μs ) pure/uniformR/unbounded/Float mean 324.6 μs ( +- 2.849 μs ) pure/random/Double mean 411.3 μs ( +- 5.876 μs ) pure/uniformR/unbounded/Double mean 416.8 μs ( +- 41.93 μs ) After: pure/random/Float mean 27.32 μs ( +- 158.0 ns ) pure/uniformR/unbounded/Float mean 27.37 μs ( +- 422.0 ns ) pure/random/Double mean 27.34 μs ( +- 303.1 ns ) pure/uniformR/unbounded/Double mean 27.49 μs ( +- 983.7 ns ) * Floating point ranges inclusive in upper bound
lehins
pushed a commit
that referenced
this pull request
May 18, 2020
* Generate Float and Double via division Coverage ======== Before: 0.787% of representable Floats in the unit interval reached After: 7.874% of representable Floats in the unit interval reached (A similar enumeration for Double is impossible, but it is very likely that coverage is increased for Doubles too.) Performance =========== Before: pure/random/Float mean 331.1 μs ( +- 21.67 μs ) pure/uniformR/unbounded/Float mean 324.6 μs ( +- 2.849 μs ) pure/random/Double mean 411.3 μs ( +- 5.876 μs ) pure/uniformR/unbounded/Double mean 416.8 μs ( +- 41.93 μs ) After: pure/random/Float mean 27.32 μs ( +- 158.0 ns ) pure/uniformR/unbounded/Float mean 27.37 μs ( +- 422.0 ns ) pure/random/Double mean 27.34 μs ( +- 303.1 ns ) pure/uniformR/unbounded/Double mean 27.49 μs ( +- 983.7 ns ) * Floating point ranges inclusive in upper bound
curiousleo
added a commit
that referenced
this pull request
May 19, 2020
* Generate Float and Double via division Coverage ======== Before: 0.787% of representable Floats in the unit interval reached After: 7.874% of representable Floats in the unit interval reached (A similar enumeration for Double is impossible, but it is very likely that coverage is increased for Doubles too.) Performance =========== Before: pure/random/Float mean 331.1 μs ( +- 21.67 μs ) pure/uniformR/unbounded/Float mean 324.6 μs ( +- 2.849 μs ) pure/random/Double mean 411.3 μs ( +- 5.876 μs ) pure/uniformR/unbounded/Double mean 416.8 μs ( +- 41.93 μs ) After: pure/random/Float mean 27.32 μs ( +- 158.0 ns ) pure/uniformR/unbounded/Float mean 27.37 μs ( +- 422.0 ns ) pure/random/Double mean 27.34 μs ( +- 303.1 ns ) pure/uniformR/unbounded/Double mean 27.49 μs ( +- 983.7 ns ) * Floating point ranges inclusive in upper bound
Shimuuar
pushed a commit
to Shimuuar/random
that referenced
this pull request
Jan 6, 2025
…hortbytestring-fixup Improve uniform ShortByteString (fixup)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Coverage
Before:
After:
(A similar enumeration for Double is impossible, but it is very likely
that coverage is increased for Doubles too.)
For the full analysis, see #105.
Performance
Before:
After:
This is simply a Pareto-improvement over what we currently have. #102 is related but separate, since it changes the coverage completely but at the cost of decreased performance.