Skip to content
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

Clean up of Gen #603

Merged
merged 1 commit into from
Jan 9, 2020
Merged

Clean up of Gen #603

merged 1 commit into from
Jan 9, 2020

Conversation

ashawley
Copy link
Contributor

@ashawley ashawley commented Jan 8, 2020

Code cherry-picked from #575

This is part of work on Gen performance improvements.
@ashawley
Copy link
Contributor Author

ashawley commented Jan 8, 2020

No surprise there was no change in the benchmark:

> bench/jmh:run -wi 3 -i 3 -f1 -t1 org.scalacheck.bench.GenBench
Benchmark                   (genSize)  (seedCount)  Mode  Cnt      Score       Error  Units
GenBench.arbitraryString          100          100  avgt    3   3343.834 ±   848.705  us/op
GenBench.asciiPrintableStr        100          100  avgt    3   2081.674 ±   234.164  us/op
GenBench.const_                   100          100  avgt    3      4.280 ±     0.485  us/op
GenBench.double_                  100          100  avgt    3     12.983 ±     1.300  us/op
GenBench.dynamicFrequency         100          100  avgt    3   2124.524 ±   263.651  us/op
GenBench.eitherIntInt             100          100  avgt    3     56.014 ±     1.844  us/op
GenBench.identifier               100          100  avgt    3   4641.965 ±   286.349  us/op
GenBench.int_                     100          100  avgt    3     16.878 ±     0.643  us/op
GenBench.listOfInt                100          100  avgt    3   1960.821 ±   227.542  us/op
GenBench.mapOfIntInt              100          100  avgt    3   4442.675 ±   144.927  us/op
GenBench.oneOf                    100          100  avgt    3     24.335 ±     3.146  us/op
GenBench.optionInt                100          100  avgt    3     67.003 ±     7.527  us/op
GenBench.sequence                 100          100  avgt    3    318.617 ±    81.490  us/op
GenBench.staticFrequency          100          100  avgt    3   2498.155 ±  6934.889  us/op
GenBench.testFilter               100          100  avgt    3  25201.300 ± 10382.093  us/op
GenBench.zipIntInt                100          100  avgt    3     49.424 ±    25.465  us/op

@ashawley
Copy link
Contributor Author

ashawley commented Jan 8, 2020

Summary:

  • Adding explicit type signatures
  • Whitespace/line formatting changes
  • Use Integer$.maxinstead of Integer.max

@ashawley ashawley merged commit c2f52d2 into typelevel:master Jan 9, 2020
@ashawley ashawley deleted the gen-cleanup branch January 10, 2020 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants