Fix RemoveDuplicateElementsBenchmark, because the results were wrong#1128
Closed
jakubsuchybio wants to merge 1 commit intoCodeMazeBlog:mainfrom
Closed
Fix RemoveDuplicateElementsBenchmark, because the results were wrong#1128jakubsuchybio wants to merge 1 commit intoCodeMazeBlog:mainfrom
jakubsuchybio wants to merge 1 commit intoCodeMazeBlog:mainfrom
Conversation
- Switch from comparing speed on strings to comparing on ints - Rewrite the 200 element array with 3 many duplicate strings to parametrized setup with N=100,10000 and Duplicates calculated by percentages 0,25,50,100 Because previous benchmark results were scewed towards O(n^2) algo as faster than O(n) algo, which is obviously bad result. Also benchmarking on comparing strings in the array might scew the results even further
Author
|
Ehm... Why didn't it get merged? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Because previous benchmark results were scewed towards O(n^2) algo as faster than O(n) algo, which is obviously bad result. Also benchmarking on comparing strings in the array might scew the results even further
Also wrote a comment to your article which is definitely wrong too, but can't edit that.
https://code-maze.com/csharp-array-remove-duplicates/