Speed performance optimized by 30 times #39
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.
初始数据:
Initial energy: -8.571526
Final energy: -8.511777
Time elapsed: 6646 ms
编译指令加入O3优化:
Initial energy: -8.571526
Final energy: -8.511777
Time elapsed: 1737 ms
将结构体OOP改成DOP
Initial energy: -8.571526
Final energy: -8.511777
Time elapsed: 1734 ms
加入编译指令
Initial energy: -8.571302
Final energy: -8.511518
Time elapsed: 1587 ms
加上暴力火车头:
Initial energy: -8.571527
Final energy: -8.511723
Time elapsed: 1175 ms
加入编译指令:
-ffast-math -march=native
Initial energy: -8.571527
Final energy: -8.511747
Time elapsed: 210 ms