Skip to content

Project with cascading files benchmarks - compare effect on signature files on incremental build - #14136

Merged
T-Gro merged 10 commits into
mainfrom
feature/project-with-cascading-files-benchmarks
Oct 19, 2022
Merged

Project with cascading files benchmarks - compare effect on signature files on incremental build#14136
T-Gro merged 10 commits into
mainfrom
feature/project-with-cascading-files-benchmarks

Conversation

@T-Gro

Copy link
Copy Markdown
Member

This set of benchmarks validates that the existence of .fsi files does have multi-fold impact on the speed of incremental build.
That is, especially if the file being modified happens to be between beginning and middle of the project.

The benchmark was running in 2^3= configurations corresponding to arguments of FsCheck, and the fact whether .fsi files were added to the compilation or not.
enablePartialTypeChecking = this.PartialCheck,
enableParallelCheckingWithSignatureFiles = this.ParaChecking

If you focus on a specific example, let's say **ParseProjectWithChangingMiddleFile ** which changes the middle file of a 128-files large project, you can see the differences across these 3 boolean configs.
In this case, the impact on the speed of incremental build can be up to 2-3x in terms of speed gains.

BenchmarkDotNet=v0.13.2, OS=Windows 11 (10.0.22621.674)
11th Gen Intel Core i9-11950H 2.60GHz, 1 CPU, 16 logical and 8 physical cores
.NET SDK=7.0.100-rc.2.22477.23
[Host] : .NET 7.0.0 (7.0.22.47203), X64 RyuJIT AVX2 DEBUG
ShortRun : .NET 7.0.0 (7.0.22.47203), X64 RyuJIT AVX2
Job=ShortRun IterationCount=3 LaunchCount=1 WarmupCount=3 
MethodPartialCheckParaCheckingGenerateFSIMeanErrorStdDevRatioRatioSDRankGen0Gen1Gen2AllocatedAlloc Ratio
ParseAndCheckLastFileProjectAsIsFalseFalseFalse11.027 ms10.202 ms0.5592 ms0.010.00I---120.92 KB0.000
ParseProjectWithChangingPenultimateFileFalseFalseFalse25.373 ms17.441 ms0.9560 ms0.020.00II656.2500281.2500-8402.02 KB0.019
ParseProjectWithChangingMiddleFileFalseFalseFalse364.452 ms894.278 ms49.0184 ms0.350.07III14000.00002000.0000-179193.09 KB0.416
ParseProjectWithChangingFirstFileFalseFalseFalse642.130 ms804.596 ms44.1026 ms0.620.05IV28000.00003000.0000-350922.82 KB0.814
ParseProjectWithFullCacheClearFalseFalseFalse1,046.582 ms1,394.643 ms76.4451 ms1.000.00V35000.00009000.00002000.0000430979.57 KB1.000
ParseAndCheckLastFileProjectAsIsFalseFalseTrue21.822 ms38.597 ms2.1156 ms0.020.00I---228.33 KB0.001
ParseProjectWithChangingPenultimateFileFalseFalseTrue43.916 ms36.434 ms1.9971 ms0.050.00II692.3077230.7692-9320.81 KB0.023
ParseProjectWithChangingMiddleFileFalseFalseTrue408.622 ms861.017 ms47.1952 ms0.440.05III13000.00002000.0000-167302.96 KB0.412
ParseProjectWithChangingFirstFileFalseFalseTrue735.510 ms1,964.457 ms107.6785 ms0.790.12IV26000.00005000.0000-325652.77 KB0.802
ParseProjectWithFullCacheClearFalseFalseTrue929.975 ms81.306 ms4.4567 ms1.000.00V33000.000010000.00002000.0000406068.07 KB1.000
ParseAndCheckLastFileProjectAsIsFalseTrueFalse9.807 ms7.528 ms0.4126 ms0.010.00I---118.53 KB0.000
ParseProjectWithChangingPenultimateFileFalseTrueFalse22.698 ms3.642 ms0.1996 ms0.020.00II656.2500281.2500-8453.61 KB0.020
ParseProjectWithChangingMiddleFileFalseTrueFalse338.556 ms334.933 ms18.3588 ms0.370.01III14000.00002000.0000-179077.58 KB0.415
ParseProjectWithChangingFirstFileFalseTrueFalse612.335 ms1,075.664 ms58.9607 ms0.670.02IV28000.00003000.0000-351421.38 KB0.815
ParseProjectWithFullCacheClearFalseTrueFalse915.377 ms1,150.000 ms63.0354 ms1.000.00V35000.00009000.00002000.0000431008.76 KB1.000
ParseAndCheckLastFileProjectAsIsFalseTrueTrue19.375 ms15.346 ms0.8412 ms0.020.00I---230.86 KB0.001
ParseProjectWithChangingPenultimateFileFalseTrueTrue35.793 ms12.569 ms0.6890 ms0.040.00II714.2857214.2857-9303.83 KB0.023
ParseProjectWithChangingMiddleFileFalseTrueTrue340.513 ms157.150 ms8.6139 ms0.360.02III13000.00002000.0000-167654.45 KB0.413
ParseProjectWithChangingFirstFileFalseTrueTrue685.282 ms339.027 ms18.5832 ms0.720.03IV26000.00005000.0000-325979.35 KB0.803
ParseProjectWithFullCacheClearFalseTrueTrue958.442 ms541.981 ms29.7078 ms1.000.00V33000.000010000.00002000.0000406067.13 KB1.000
ParseAndCheckLastFileProjectAsIsTrueFalseFalse8.724 ms1.675 ms0.0918 ms0.010.00I---119.38 KB0.000
ParseProjectWithChangingPenultimateFileTrueFalseFalse23.033 ms5.042 ms0.2764 ms0.030.00II656.2500281.2500-8410.91 KB0.019
ParseProjectWithChangingMiddleFileTrueFalseFalse312.968 ms502.321 ms27.5339 ms0.410.05III14000.00002000.0000-177325.7 KB0.403
ParseProjectWithChangingFirstFileTrueFalseFalse508.210 ms123.797 ms6.7857 ms0.670.03IV28000.00003000.0000-347377.86 KB0.789
ParseProjectWithFullCacheClearTrueFalseFalse764.298 ms703.481 ms38.5601 ms1.000.00V36000.000011000.00004000.0000440120.64 KB1.000
ParseAndCheckLastFileProjectAsIsTrueFalseTrue17.545 ms9.458 ms0.5184 ms0.040.00I---133.31 KB0.001
ParseProjectWithChangingPenultimateFileTrueFalseTrue28.262 ms7.366 ms0.4038 ms0.070.00II312.5000156.2500-4177.03 KB0.028
ParseProjectWithChangingMiddleFileTrueFalseTrue115.049 ms224.340 ms12.2968 ms0.280.03III2800.0000800.0000-35153.53 KB0.234
ParseProjectWithChangingFirstFileTrueFalseTrue192.335 ms152.500 ms8.3590 ms0.460.01IV4666.66671000.0000-60968.41 KB0.405
ParseProjectWithFullCacheClearTrueFalseTrue417.720 ms190.919 ms10.4649 ms1.000.00V12000.00007000.00003000.0000150548.34 KB1.000
ParseAndCheckLastFileProjectAsIsTrueTrueFalse9.145 ms9.866 ms0.5408 ms0.010.00I---116.28 KB0.000
ParseProjectWithChangingPenultimateFileTrueTrueFalse24.712 ms18.141 ms0.9944 ms0.030.00II656.2500281.2500-8406.78 KB0.019
ParseProjectWithChangingMiddleFileTrueTrueFalse307.731 ms474.400 ms26.0035 ms0.340.03III14000.00002000.0000-177520.01 KB0.404
ParseProjectWithChangingFirstFileTrueTrueFalse524.612 ms191.084 ms10.4740 ms0.580.02IV28000.00003000.0000-347610.17 KB0.790
ParseProjectWithFullCacheClearTrueTrueFalse905.933 ms191.779 ms10.5121 ms1.000.00V35000.000010000.00004000.0000439927.7 KB1.000
ParseAndCheckLastFileProjectAsIsTrueTrueTrue18.328 ms2.036 ms0.1116 ms0.040.00I---136.55 KB0.001
ParseProjectWithChangingPenultimateFileTrueTrueTrue33.871 ms20.096 ms1.1015 ms0.080.01II312.5000156.2500-4195.5 KB0.028
ParseProjectWithChangingMiddleFileTrueTrueTrue119.979 ms96.769 ms5.3043 ms0.290.02III2750.0000750.0000-35245.54 KB0.234
ParseProjectWithChangingFirstFileTrueTrueTrue160.949 ms109.366 ms5.9947 ms0.390.02IV4666.66671000.0000-60744.59 KB0.403
ParseProjectWithFullCacheClearTrueTrueTrue409.830 ms485.428 ms26.6080 ms1.000.00V12000.00007000.00003000.0000150609.31 KB1.000

0101
0101 previously approved these changes Oct 18, 2022
…ascadeBenchmarks.fs
Co-authored-by: Petr Pokorny <petrpokorny@microsoft.com>
@T-Gro
T-Gro requested a review from 0101October 18, 2022 16:08

@psfinakipsfinaki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. So I guess generally this means we should first speed up signature files before focusing on their convenient auto-generation?

@T-Gro
T-Gro merged commit fbfc406 into mainOct 19, 2022
@T-Gro
T-Gro deleted the feature/project-with-cascading-files-benchmarks branch February 2, 2023 13:04
Sign up for freeto 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.

3 participants

@T-Gro@0101@psfinaki