How many cycles does memcpy require in VxWorks w.r.t Arm Processor.
Is 'for' better compared to 'memcpy' in VxWorks ? Any ideas ?
Thx in advans,
Reply by Wilco Dijkstra●October 18, 20072007-10-18
"karthikbalaguru" <email@example.com> wrote in message
> How many cycles does memcpy require in VxWorks w.r.t Arm Processor.
Although some RTOSes supply their own variants, memcpy is part of
the compiler and libraries, and it is typically best to use the latter. If you
chose a good compiler you simply do not have to worry about this.
How fast memcpy is depends a lot on the particular implementation
chosen, the goals (codesize, performance), the alignment and size
of the data you are copying and last but not least the CPU used and
its memory system ("ARM" is nowhere near specific enough).
> Is 'for' better compared to 'memcpy' in VxWorks ? Any ideas ?
Memcpy is best implemented in highly optimised assembler copying
16+ bytes per iteration, taking less than 1 cycle per byte copied.
A "for" loop copying one byte at a time is about 10 times as slow...
It's best to do some benchmarking yourself with the kind of copies you need.