Skip to content
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

finish hw04 #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

finish hw04 #43

wants to merge 1 commit into from

Conversation

Daydream0929
Copy link

优化方法

  1. AOS ---> SOA
  2. vector ----> array
  3. 将内部循环里的变量提取到外部循环
  4. 使用std::数学库
  5. CMakeLists 添加 target_compile_options(main PUBLIC -ffast-math -march=native) 开启数学库和SIMD

优化前:1351ms
优化后:130ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant