-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
⚡️ Switch towards a faster shrinker for integer #1358
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e32c346:
|
Codecov Report
@@ Coverage Diff @@
## master #1358 +/- ##
=======================================
Coverage 98.73% 98.73%
=======================================
Files 91 91
Lines 3005 3012 +7
Branches 522 524 +2
=======================================
+ Hits 2967 2974 +7
Misses 35 35
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Give a try to 9de29b5 with: yarn add https://6004263759b42bf0411bc2c7--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6004263759b42bf0411bc2c7--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to 80f549a with: yarn add https://6004756559b42b6cdb1bc2ce--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6004756559b42b6cdb1bc2ce--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to 97343b6 with: yarn add https://600478780c5c78a7737c7fb9--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://600478780c5c78a7737c7fb9--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to a3f368f with: yarn add https://60047ba1a9166e8e60632894--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://60047ba1a9166e8e60632894--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to 90fee61 with: yarn add https://6005db408a2bba25f35635ba--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6005db408a2bba25f35635ba--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to 154071e with: yarn add https://6005dc82685d26e0ced7279b--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6005dc82685d26e0ced7279b--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to dfec4bd with: yarn add https://6005e08ca9166ec92f632537--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6005e08ca9166ec92f632537--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to 88bc92a with: yarn add https://6005e3dcb454fc66575854cd--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6005e3dcb454fc66575854cd--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to 851cd54 with: yarn add https://6005e52d5116396421e7b731--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6005e52d5116396421e7b731--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to e32c346 with: yarn add https://6005e607685d26ed15d72577--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6005e607685d26ed15d72577--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to e32c346 with: yarn add https://6005ea508a2bba3efc563324--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6005ea508a2bba3efc563324--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to dbcd8a3 with: yarn add https://6005f26587c13191ad2512b3--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6005f26587c13191ad2512b3--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
Give a try to dbcd8a3 with: yarn add https://6005f27d2191b495bfbaf1dc--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz
npm i https://6005f27d2191b495bfbaf1dc--dazzling-goodall-4f0e38.netlify.app/fast-check.tgz Or have a look to the generated documentation. |
In order to ensure that the proposed update enhance the shrinking in general, I ran a subset of the shrinking challenge on both 2.11.0 and this PR. The results below have been measured over 10k runs. On 2.11.0 bound5 - min=19 avg=76 max=220 [[[],[],[-16],[],[-32753]]] num=12 min=30 avg=37 max=41
[[[],[],[-11],[],[-32758]]] num=11 min=32 avg=34 max=38
[[[],[],[],[-13],[-32756]]] num=10 min=30 avg=35 max=40
[[[],[],[],[-1],[-32768]]] num=10 min=24 avg=32 max=35
[[[-15],[],[],[-32754],[]]] num=9 min=31 avg=37 max=48 distinct - min=9 avg=249 max=293 [[0,1,2]] num=2557 min=16 avg=249 max=289
[[0,-1,1]] num=2517 min=9 avg=251 max=291
[[0,-1,-2]] num=2460 min=24 avg=249 max=293
[[0,1,-1]] num=2376 min=26 avg=253 max=291
[[0,2,1]] num=22 min=19 avg=98 max=143 large_union_list - min=84 avg=994 max=1428 [[[0,-1,-2,1,2]]] num=415 min=167 avg=1089 max=1291
[[[0,-1,1,2,-2]]] num=381 min=144 avg=1055 max=1314
[[[0,1,-1,-2,-3]]] num=381 min=394 avg=1050 max=1253
[[[0,1,2,-1,-2]]] num=380 min=312 avg=1082 max=1288
[[[0,1,-1,2,3]]] num=380 min=171 avg=1064 max=1253 nestedlists - min=26 avg=39 max=125 [[[0],[0,0,0,0,0,0,0,0,0,0]]] num=1030 min=33 avg=43 max=85
[[[0,0],[0,0,0,0,0,0,0,0,0]]] num=933 min=31 avg=39 max=79
[[[0,0,0],[0,0,0,0,0,0,0,0]]] num=800 min=29 avg=37 max=76
[[[0,0,0,0],[0,0,0,0,0,0,0]]] num=667 min=28 avg=37 max=90
[[[0,0,0,0,0],[0,0,0,0,0,0]]] num=618 min=28 avg=37 max=79 reverse - min=6 avg=86 max=103 [[0,-1]] num=5063 min=6 avg=86 max=102
[[0,1]] num=4914 min=6 avg=87 max=103
[[1,0]] num=13 min=13 avg=42 max=68
[[-1,0]] num=10 min=12 avg=55 max=68 coupling - min=3 avg=32 max=152 lengthlist - min=1 avg=13 max=57 At dbcd8a3 bound5 - min=19 avg=44 max=141 [[[],[],[-10],[],[-32759]]] num=11 min=30 avg=44 max=62
[[[],[],[-8],[],[-32761]]] num=10 min=21 avg=39 max=49
[[[],[-8],[],[],[-32761]]] num=10 min=21 avg=43 max=56
[[[],[-15],[-32754],[],[]]] num=9 min=42 avg=47 max=71
[[[],[],[],[-6],[-32763]]] num=9 min=26 avg=38 max=47 distinct - min=17 avg=277 max=361 [[0,1,-1]] num=2534 min=22 avg=278 max=324
[[0,-1,1]] num=2445 min=28 avg=281 max=361
[[0,-1,-2]] num=2439 min=17 avg=278 max=318
[[0,1,2]] num=2437 min=33 avg=277 max=318
[[0,-2,-1]] num=59 min=22 avg=147 max=234 large_union_list - min=111 avg=1194 max=1689 [[[0,-1,-2,-3,1]]] num=403 min=489 avg=1312 max=1409
[[[0,-1,1,2,-2]]] num=397 min=525 avg=1312 max=1409
[[[0,1,-1,2,3]]] num=378 min=360 avg=1311 max=1407
[[[0,-1,1,-2,-3]]] num=374 min=173 avg=1312 max=1408
[[[0,-1,-2,1,2]]] num=373 min=377 avg=1309 max=1506 nestedlists - min=26 avg=40 max=133 [[[0],[0,0,0,0,0,0,0,0,0,0]]] num=1057 min=33 avg=43 max=86
[[[0,0],[0,0,0,0,0,0,0,0,0]]] num=950 min=31 avg=39 max=79
[[[0,0,0],[0,0,0,0,0,0,0,0]]] num=781 min=29 avg=37 max=76
[[[0,0,0,0],[0,0,0,0,0,0,0]]] num=655 min=28 avg=37 max=75
[[[0,0,0,0,0],[0,0,0,0,0,0]]] num=580 min=28 avg=36 max=82 reverse - min=6 avg=87 max=103 [[0,-1]] num=5035 min=6 avg=86 max=103
[[0,1]] num=4940 min=6 avg=87 max=103
[[1,0]] num=16 min=15 avg=58 max=70
[[-1,0]] num=9 min=15 avg=44 max=70 coupling - min=3 avg=33 max=144 lengthlist - min=1 avg=8 max=16 |
In a nutshell
❌ New feature
❌ Fix an issue
❌ Documentation improvement
✔️ Other: performance
(✔️: yes, ❌: no)
Potential impacts
Shrink values impact: integer, and certainly most of the others built-in arbitraries.
It will also impact
shrinkableFor
as it will includes an extra value at the end of the shrinking tree.