Am 11.03.2010 22:14, schrieb Myles Watson:
I was having trouble with stack corruption. Using memset (C) instead of clear_memory(asm) speeds it up by almost a factor of 2 for a 1M region.
I should have said it got rid of the memory corruption I was seeing, too :)
TSC difference with clear_memory 0xFA884D TSC difference with memset 0x826742
Interesting that the C version is faster in this case.
Yeah. Maybe you could do a lot better with a different asm implementation. You'd hope that the compiler would have a pretty good routine for clearing memory, though. I didn't dig into it to see what the real difference was.
SIgned-off-by: Myles Watson <mylesgw@gmail.com
mailto:mylesgw@gmail.com> Acked-by: Patrick Georgi patrick.georgi@coresystems.de
Rev 5201.
Thanks, Myles