Possible 50% performance improvement for NSGA-II on MSVC #616
Open
jonas-s-s-s wants to merge 11 commits intoesa:masterfrom
Open
Possible 50% performance improvement for NSGA-II on MSVC #616jonas-s-s-s wants to merge 11 commits intoesa:masterfrom
jonas-s-s-s wants to merge 11 commits intoesa:masterfrom
Conversation
Version of a hot-path function with pre-allocated vectors, reduced CPU time spent on vector allocation approximately from 7% to 1%.
Minor 0.1% / 0.2% performance increase Switch to passing struct via function params instead of static Static is not thread-safe Add another fnds_buffer inside of nsga2.cpp
This reverts commit 5083caf.
This reverts commit 7d81225.
This reverts commit 1ecf79a.
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.
Hello everyone,
as part of my Master's Thesis (Faculty of Applied Sciences, University of West Bohemia), I have been investigating the poor performance of pagmo2's implementation of NSGA2 when compiled with MSVC. The changes that I've made decrease the execution time by about 50% (MSVC 19.44.35217). This improvement was possible due to the inefficiency of
std::isnanin the MSVC Runtime Library.Other compilers such as (Clang and GCC) benefit mainly from the memory optimizations, decreasing the execution time by about 15%.
The main changes in this PR include:
less_than_f,greater_than_f,equal_to_fusing C++20 starship operatorpareto_dominance()fast_non_dominated_sorting_buffered()andselect_best_N_mo_buffered()Detailed explanation together with the code that was used for profiling can be found here: https://github.com/jonas-s-s-s/Pagmo-NSGA2-Improve-Test