Wood David wrote:
OK - that's helpful. My example was trivial, but in practice I'm trying to zero very large arrays of large records which I very time consuming with loops and type-matched assignments.
(1) What about this: get a pointer to the first array element and then clear sizeof-array-element * array-size bytes ?
(2) With modern risc processors, the time delay for operations on large data sets is typically in memory stalls, not in processor instructions. Are your records densely packed or unaligned on the processor's "natural" data bounds ? Did you actually try to zero the array in a for loop per record (with a low-level routine if you want) ? Did you profile the software ?
Regards,
Adriaan van Os