-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
.NET 10 P1 -- Runtime and Libraries changes #9715
base: dotnet10p1
Are you sure you want to change the base?
Conversation
} | ||
``` | ||
|
||
## ZipArchive performance and memory improvements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @edwardneal we're including your excellent contributions in the prev1 release notes. If you have any suggestions to improve the description of the PRs, feel free to provide them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @carlossanlop, that's great news. I've not got anything to add to the release notes, but have re-run the benchmarks with both changes merged.
PR 103153, ReadZipArchive: 18% reduction in execution time, 18% reduction in memory usage
Method | Job | Runtime | NumberOfFiles | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Gen1 | Gen2 | Allocated | Alloc Ratio |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Benchmark | Baseline | .NET 9.0 | 2 | 1,178.6 ns | 23.23 ns | 22.81 ns | 1.00 | 0.03 | 0.3700 | - | - | 1.52 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 2 | 821.6 ns | 12.45 ns | 11.65 ns | 0.70 | 0.02 | 0.2899 | - | - | 1.19 KB | 0.78 |
Benchmark | Baseline | .NET 9.0 | 10 | 4,205.5 ns | 62.41 ns | 55.33 ns | 1.00 | 0.02 | 1.4954 | - | - | 6.13 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 10 | 3,467.5 ns | 67.25 ns | 66.05 ns | 0.82 | 0.02 | 1.2054 | - | - | 4.93 KB | 0.80 |
Benchmark | Baseline | .NET 9.0 | 25 | 10,201.5 ns | 190.59 ns | 187.18 ns | 1.00 | 0.02 | 3.5095 | - | - | 14.38 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 25 | 8,210.2 ns | 152.35 ns | 142.51 ns | 0.81 | 0.02 | 2.8229 | - | - | 11.54 KB | 0.80 |
Benchmark | Baseline | .NET 9.0 | 50 | 20,152.7 ns | 333.29 ns | 311.76 ns | 1.00 | 0.02 | 7.0496 | - | - | 28.91 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 50 | 20,109.1 ns | 517.18 ns | 1,500.43 ns | 1.00 | 0.08 | 5.7068 | - | - | 23.34 KB | 0.81 |
Benchmark | Baseline | .NET 9.0 | 100 | 46,986.2 ns | 923.08 ns | 1,906.33 ns | 1.00 | 0.06 | 14.2822 | 0.1221 | - | 58.42 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 100 | 37,767.2 ns | 752.51 ns | 1,554.06 ns | 0.81 | 0.05 | 11.5967 | 0.0610 | - | 47.38 KB | 0.81 |
Benchmark | Baseline | .NET 9.0 | 250 | 115,159.8 ns | 2,211.52 ns | 2,271.07 ns | 1.00 | 0.03 | 34.5459 | 0.1221 | - | 141.42 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 250 | 94,148.7 ns | 1,842.33 ns | 3,414.87 ns | 0.82 | 0.03 | 27.8320 | 0.3662 | - | 113.97 KB | 0.81 |
Benchmark | Baseline | .NET 9.0 | 500 | 241,338.5 ns | 4,726.33 ns | 7,896.64 ns | 1.00 | 0.05 | 69.8242 | 0.4883 | - | 285.86 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 500 | 184,869.9 ns | 2,969.04 ns | 4,162.18 ns | 0.77 | 0.03 | 56.1523 | 0.7324 | - | 231.06 KB | 0.81 |
Benchmark | Baseline | .NET 9.0 | 1000 | 510,114.6 ns | 10,092.12 ns | 20,386.57 ns | 1.00 | 0.05 | 114.2578 | 72.2656 | - | 577.2 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 1000 | 404,349.3 ns | 7,289.88 ns | 16,153.88 ns | 0.79 | 0.04 | 93.2617 | 52.7344 | - | 467.72 KB | 0.81 |
Benchmark | Baseline | .NET 9.0 | 10000 | 13,950,239.9 ns | 273,372.39 ns | 345,728.57 ns | 1.00 | 0.03 | 1000.0000 | 687.5000 | 218.7500 | 5786.24 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 10000 | 10,911,298.0 ns | 204,013.47 ns | 226,760.43 ns | 0.78 | 0.02 | 843.7500 | 609.3750 | 250.0000 | 4692.19 KB | 0.81 |
PR 103153, CreateZipArchive: 23-35% reduction in execution time, 2% reduction in memory usage
NB: There's only a 2% reduction in memory usage because overall memory usage has ballooned in both the before and after cases. I'm pretty sure this is fine - zlib-ng seems to have a bimodal execution time on my machine and this skews the benchmark, so I disabled compression of the newly-added entries.
Method | Job | Runtime | NumberOfFiles | Mean | Error | StdDev | Median | Ratio | RatioSD | Gen0 | Gen1 | Allocated | Alloc Ratio |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Benchmark | Baseline | .NET 9.0 | 2 | 2.729 μs | 0.0538 μs | 0.0449 μs | 2.706 μs | 1.00 | 0.02 | 2.2697 | - | 9.28 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 2 | 1.665 μs | 0.0256 μs | 0.0239 μs | 1.659 μs | 0.61 | 0.01 | 2.2259 | - | 9.1 KB | 0.98 |
Benchmark | Baseline | .NET 9.0 | 10 | 10.341 μs | 0.1988 μs | 0.2289 μs | 10.266 μs | 1.00 | 0.03 | 9.7046 | - | 39.76 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 10 | 7.937 μs | 0.1514 μs | 0.2487 μs | 7.831 μs | 0.77 | 0.03 | 9.5215 | - | 39.02 KB | 0.98 |
Benchmark | Baseline | .NET 9.0 | 25 | 24.677 μs | 0.4903 μs | 0.8842 μs | 24.563 μs | 1.00 | 0.05 | 20.1721 | 3.3569 | 82.92 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 25 | 18.247 μs | 0.3474 μs | 0.3412 μs | 18.192 μs | 0.74 | 0.03 | 19.7754 | 3.2654 | 81.13 KB | 0.98 |
Benchmark | Baseline | .NET 9.0 | 50 | 67.420 μs | 5.7447 μs | 16.9384 μs | 57.185 μs | 1.05 | 0.35 | 40.5273 | 13.4888 | 166.71 KB | 1.00 |
Benchmark | CoreRun | .NET 10.0 | 50 | 41.443 μs | 0.7212 μs | 0.8306 μs | 41.493 μs | 0.65 | 0.13 | 39.6729 | 0.0610 | 163.16 KB | 0.98 |
PR 102704, AddEntryToLargeZipArchive (zero-length entry, 2GB ZIP file): 99.8% reduction in execution time, 99.9996% reduction in memory usage
Method | Job | Runtime | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Gen1 | Gen2 | Allocated | Alloc Ratio |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Benchmark | Baseline | .NET 9.0 | 4.187 s | 83.3751 ms | 177.6792 ms | 1.002 | 0.06 | 1000.0000 | 1000.0000 | 1000.0000 | 2 GB | 1.000 |
Benchmark | CoreRun | .NET 10.0 | 9.452 ms | 0.1583 ms | 0.1322 ms | 0.002 | 0.00 | - | - | - | 7.01 KB | 0.000 |
If there are community PRs, at-mention the folks and get them added. We can continue to use the same general format as we've used in the past where we give community credit. |
No description provided.