I have converted all the C++ consts to constrefs
It might not help anything, but you might want to use
const instead, cause unlike for
constref (which is always passed by reference) the compiler is free to pass it in a more optimal way. As said, it might not help in your situation, but that's the general rule of thumb: only use
constref when you really, really need a reference and not for optimization.
I got about .25-.5% improvement with Move, which is used heavily, but FillQWord turned out to be probably slower than plain for loops.
FillQWord is likely to be the one of the
Fill* routines that's the least optimized. I'd suggest you to use
FillChar instead, which is usually the best optimized one.
Additionally you could try to use the C memory manager by using the
cmem unit as the first unit in your program file, just to check whether the RTL's heap is making a difference here.