fix a critical bug in the set_box_info method of BoxMap - #7
Merged
Conversation
This fix takes the time complexity of the algorithm down to O(n^2) from an estimated O(2^n). Also did a lot op optimisations to the code, increasing performance by a large margin. Some benchmarks follow: - In both the optimised and unoptimised versions of the code the fix has been applied. - All test were done on an AMD FX-6350 @ 4.5Ghz, with the same test case for both versions. - The code was built using the supplied cmake build, using the release build configuration. Test size | total insertions | unoptimised | optimised 50 | 10000 | 1610+-100ms | 195+-10ms 100 | 40000 | 33.2+-.1s | 3.21+-.5s 150 | 90000 | 199+-3s | 19.3+-.1s From these tests it can be concluded that there is an average speedup of around 860%. It can also be observed that the algorithm conforms reasonably well to the calculated O(n^2) complexity.
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.
This fix takes the time complexity of the algorithm down to O(n^2) from an estimated O(2^n).
Also did a lot op optimisations to the code, increasing performance by a large margin.
Some benchmarks follow:
of the code the fix has been applied.
with the same test case for both versions.
using the release build configuration.
From these tests it can be concluded that: