Very fast memcpy for image processing?

前端 未结 7 871
萌比男神i
萌比男神i 2020-11-30 18:33

I am doing image processing in C that requires copying large chunks of data around memory - the source and destination never overlap.

What is the absolute fastest wa

相关标签:
7条回答
  • 2020-11-30 19:28

    At any optimisation level of -O1 or above, GCC will use builtin definitions for functions like memcpy - with the right -march parameter (-march=pentium4 for the set of features you mention) it should generate pretty optimal architecture-specific inline code.

    I'd benchmark it and see what comes out.

    0 讨论(0)
提交回复
热议问题