Last active
August 29, 2015 14:23
-
-
Save fcard/aca7b07d24ff24b01d4d to your computer and use it in GitHub Desktop.
Average times of the new short-circuiting `any` and `all`
This file contains hidden or 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
| #---------------------------------------------------------------- | |
| # any([false for x = 1:100000]) | |
| #---------------------------------------------------------------- | |
| old any = 274.780 microseconds | |
| new any V1 = 400.905 microseconds | |
| new any V2 = 329.738 microseconds | |
| new any V3 = 358.323 microseconds | |
| new any V4 = 289.087 microseconds | |
| #---------------------------------------------------------------- | |
| # any((false,false,false,false,false,false,false,false,false...)) | |
| #---------------------------------------------------------------- | |
| old any = 5.845 microseconds | |
| new any V1 = 3.709 microseconds | |
| new any V2 = 7.444 microseconds | |
| new any V3 = 7.022 microseconds | |
| new any V4 = 13.976 microseconds | |
| #---------------------------------------------------------------- | |
| # any([[false for x = 1:50000],[true],[false for x = 1:50000]]) | |
| #---------------------------------------------------------------- | |
| old any = 123.918 microseconds | |
| new any V1 = 218.510 microseconds | |
| new any V2 = 127.882 microseconds | |
| new any V3 = 192.321 microseconds | |
| new any V4 = 183.800 microseconds | |
| #---------------------------------------------------------------- | |
| # any(lessthan0, 1:10000) | |
| #---------------------------------------------------------------- | |
| old any = 2.147 milliseconds | |
| new any V1 = 917.664 microseconds | |
| new any V2 = 931.044 microseconds | |
| new any V3 = 1.060 milliseconds | |
| new any V4 = 826.348 microseconds | |
| #---------------------------------------------------------------- | |
| # any(equalsto1000, 1:10000) | |
| #---------------------------------------------------------------- | |
| old any = 2.040 milliseconds | |
| new any V1 = 90.326 microseconds | |
| new any V2 = 144.291 microseconds | |
| new any V3 = 144.163 microseconds | |
| new any V4 = 196.241 microseconds | |
| #---------------------------------------------------------------- | |
| # any(equalsto1000, Set(1:10000)) | |
| #---------------------------------------------------------------- | |
| old any = 214.569 microseconds | |
| new any V1 = 219.978 microseconds | |
| new any V2 = 270.299 microseconds | |
| new any V3 = 208.996 microseconds | |
| new any V4 = 272.157 microseconds | |
| #---------------------------------------------------------------- | |
| # any(1:100000 .< -1) | |
| #---------------------------------------------------------------- | |
| old any = 3.508 microseconds | |
| new any V1 = 2.986 microseconds | |
| new any V2 = 3.074 microseconds | |
| new any V3 = 3.255 microseconds | |
| new any V4 = 2.976 microseconds | |
| #---------------------------------------------------------------- | |
| # any(1:100000 .== 50000) | |
| #---------------------------------------------------------------- | |
| old any = 2.378 microseconds | |
| new any V1 = 2.929 microseconds | |
| new any V2 = 2.539 microseconds | |
| new any V3 = 2.559 microseconds | |
| new any V4 = 2.688 microseconds | |
| #---------------------------------------------------------------- | |
| # all([true for x = 1:100000]) | |
| #---------------------------------------------------------------- | |
| old all = 283.313 microseconds | |
| new all V1 = 449.748 microseconds | |
| new all V2 = 350.137 microseconds | |
| new all V3 = 355.888 microseconds | |
| new all V4 = 322.151 microseconds | |
| #---------------------------------------------------------------- | |
| # all((true,true,true,true,true,true,true,true,true...)) | |
| #---------------------------------------------------------------- | |
| old all = 6.309 microseconds | |
| new all V1 = 5.061 microseconds | |
| new all V2 = 7.447 microseconds | |
| new all V3 = 9.017 microseconds | |
| new all V4 = 40.080 microseconds | |
| #---------------------------------------------------------------- | |
| # all([[true for x = 1:50000],[false],[true for x = 1:50000]]) | |
| #---------------------------------------------------------------- | |
| old all = 245.257 microseconds | |
| new all V1 = 254.317 microseconds | |
| new all V2 = 174.578 microseconds | |
| new all V3 = 155.870 microseconds | |
| new all V4 = 149.578 microseconds | |
| #---------------------------------------------------------------- | |
| # all(greaterthan0, 1:10000) | |
| #---------------------------------------------------------------- | |
| old all = 1.569 milliseconds | |
| new all V1 = 1.920 milliseconds | |
| new all V2 = 1.734 milliseconds | |
| new all V3 = 1.712 milliseconds | |
| new all V4 = 633.544 microseconds | |
| #---------------------------------------------------------------- | |
| # all(diffthan5000, 1:10000) | |
| #---------------------------------------------------------------- | |
| old all = 1.235 milliseconds | |
| new all V1 = 696.744 microseconds | |
| new all V2 = 869.251 microseconds | |
| new all V3 = 1.028 milliseconds | |
| new all V4 = 470.036 microseconds | |
| #---------------------------------------------------------------- | |
| # all(diffthan5000, Set(1:10000)) | |
| #---------------------------------------------------------------- | |
| old all = 2.472 milliseconds | |
| new all V1 = 2.304 milliseconds | |
| new all V2 = 2.434 milliseconds | |
| new all V3 = 2.268 milliseconds | |
| new all V4 = 1.277 milliseconds | |
| #---------------------------------------------------------------- | |
| # all(1:100000 .> -1) | |
| #---------------------------------------------------------------- | |
| old all = 4.029 microseconds | |
| new all V1 = 3.003 microseconds | |
| new all V2 = 2.943 microseconds | |
| new all V3 = 4.372 microseconds | |
| new all V4 = 2.955 microseconds | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment