Home away from home
Joined: 2007/1/26 21:48 Last Login
: Today 14:15
From New Zealand
Group:
Registered Users
|
@thellier
I have no ready-to-use routines to share, sorry.
If you're copying within RAM, then the exec.library's mem copy function should already be optimal for whatever machine you're on. Consequently, memcpy() should be too.
If you're transferring to/from VRAM, then WritePixelArray()/ReadPixelArray() are the best option (will even use DMA on platforms where DMA routines are available).
If you really want to embed it in your code, then things get complicated. On altivec machines, using altivec is best (in a cache-aligned manner), using doubles is optimal on most others, except for the e500 core (Tabor/A1222), which has a non-standard FPU. Then there are cache instructions that can help boost performance, but which one you should use depends on which CPU (e.g., dcbz on 32-bit CPUs, and dcbzl on 64-bit CPUs).
Hans
|