-
Notifications
You must be signed in to change notification settings - Fork 274
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
And linq #895
Merged
Merged
And linq #895
Commits on Sep 28, 2024
-
This is a partial set of clean-ups. There could be others, but they may be controversial (e.g. adopting LINQ in some areas, which may or may not hurt performance). I've also tried to be mindful of target framework versions and also some edge cases (e.g. hashing) where seemingly redundant chunks of code, if removed or changed for another option, may blow things up. See what you think.
Configuration menu - View commit details
-
Copy full SHA for 2b2effd - Browse repository at this point
Copy the full SHA 2b2effdView commit details -
Adding LINQ on top of the other clean-ups
Pre-change: // * Summary * BenchmarkDotNet=v0.12.1, OS=endeavouros AMD Ryzen 7 5800H with Radeon Graphics, 1 CPU, 16 logical and 8 physical cores .NET Core SDK=8.0.108 [Host] : .NET Core 8.0.8 (CoreCLR 8.0.824.36612, CoreFX 8.0.824.36612), X64 RyuJIT Job-GRIUMJ : .NET Core 8.0.8 (CoreCLR 8.0.824.36612, CoreFX 8.0.824.36612), X64 RyuJIT IterationCount=1 LaunchCount=1 WarmupCount=1 | Method | EdgeCount | Mean | Error | Gen 0 | Gen 1 | Gen 2 | Allocated | |--------------- |---------- |-----------:|------:|----------:|----------:|----------:|----------:| | Intersection_N | 1000 | 119.9 ms | NA | 1000.0000 | - | - | 9.04 MB | | Intersection_N | 2000 | 542.1 ms | NA | 1000.0000 | - | - | 16.2 MB | | Intersection_N | 3000 | 1,431.1 ms | NA | 5000.0000 | 4000.0000 | 1000.0000 | 37.28 MB | | Intersection_N | 4000 | 3,008.9 ms | NA | 6000.0000 | 5000.0000 | 1000.0000 | 47.41 MB | | Intersection_N | 5000 | 6,173.7 ms | NA | 9000.0000 | 8000.0000 | 1000.0000 | 74.05 MB | // * Legends * EdgeCount : Value of the 'EdgeCount' parameter Mean : Arithmetic mean of all measurements Error : Half of 99.9% confidence interval Gen 0 : GC Generation 0 collects per 1000 operations Gen 1 : GC Generation 1 collects per 1000 operations Gen 2 : GC Generation 2 collects per 1000 operations Allocated : Allocated memory per single operation (managed only, inclusive, 1KB = 1024B) 1 ms : 1 Millisecond (0.001 sec) // * Diagnostic Output - MemoryDiagnoser * // ***** BenchmarkRunner: End ***** // ** Remained 0 benchmark(s) to run ** Run time: 00:00:47 (47.83 sec), executed benchmarks: 5 Global total time: 00:00:57 (57.28 sec), executed benchmarks: 5 Post-change: // * Summary * BenchmarkDotNet=v0.12.1, OS=endeavouros AMD Ryzen 7 5800H with Radeon Graphics, 1 CPU, 16 logical and 8 physical cores .NET Core SDK=8.0.108 [Host] : .NET Core 8.0.8 (CoreCLR 8.0.824.36612, CoreFX 8.0.824.36612), X64 RyuJIT Job-WWTCPL : .NET Core 8.0.8 (CoreCLR 8.0.824.36612, CoreFX 8.0.824.36612), X64 RyuJIT IterationCount=1 LaunchCount=1 WarmupCount=1 | Method | EdgeCount | Mean | Error | Gen 0 | Gen 1 | Gen 2 | Allocated | |--------------- |---------- |-----------:|------:|----------:|----------:|----------:|----------:| | Intersection_N | 1000 | 127.1 ms | NA | - | - | - | 6.85 MB | | Intersection_N | 2000 | 475.1 ms | NA | 2000.0000 | 1000.0000 | - | 23.04 MB | | Intersection_N | 3000 | 1,408.1 ms | NA | 5000.0000 | 4000.0000 | 1000.0000 | 36.15 MB | | Intersection_N | 4000 | 2,874.6 ms | NA | 5000.0000 | 4000.0000 | 1000.0000 | 41.76 MB | | Intersection_N | 5000 | 5,954.3 ms | NA | 9000.0000 | 8000.0000 | 2000.0000 | 68.62 MB | // * Legends * EdgeCount : Value of the 'EdgeCount' parameter Mean : Arithmetic mean of all measurements Error : Half of 99.9% confidence interval Gen 0 : GC Generation 0 collects per 1000 operations Gen 1 : GC Generation 1 collects per 1000 operations Gen 2 : GC Generation 2 collects per 1000 operations Allocated : Allocated memory per single operation (managed only, inclusive, 1KB = 1024B) 1 ms : 1 Millisecond (0.001 sec) // * Diagnostic Output - MemoryDiagnoser * // ***** BenchmarkRunner: End ***** // ** Remained 0 benchmark(s) to run ** Run time: 00:00:46 (46.34 sec), executed benchmarks: 5 Global total time: 00:00:51 (51.28 sec), executed benchmarks: 5
Configuration menu - View commit details
-
Copy full SHA for 9c18c1b - Browse repository at this point
Copy the full SHA 9c18c1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20d2f9c - Browse repository at this point
Copy the full SHA 20d2f9cView commit details
Commits on Sep 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 63251ea - Browse repository at this point
Copy the full SHA 63251eaView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.