Skip to content

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