[coreboot] [PATCH] use memset
mylesgw at gmail.com
Thu Mar 11 22:39:48 CET 2010
> 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 at gmail.com
> <mailto:mylesgw at gmail.com>>
> Acked-by: Patrick Georgi <patrick.georgi at coresystems.de>
More information about the coreboot