flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
Madis731 19 Dec 2007, 09:11
Do we need this in WIN32/64 FAQ?
|
|||
![]() |
|
revolution 22 Dec 2007, 14:09
In assembly, if we know some information that the compiler doesn't then we can get better performance. eg. if we know that source and dest are always aligned to 64 byte boundary then we don't need extra code to check the alignments and such. Our initialisation code can be just a few instructions setting up the loop counters. Anyhow, this is just an example where a little bit more knowledge that is not possible to tell the compiler can be to our advantage.
|
|||
![]() |
|
f0dder 22 Dec 2007, 14:16
The compiler doesn't need to know about memory alignment, the programmer does. I'd never use these optimizations for a simple memcpy (would probably stick with rep movsd there), but only use this kind of stuff where I know explicitly it gives a performance boost... and then I'd obviously also make sure that memory is aligned.
Imho all the cache-control, superbig moves etc. doesn't belong in a generic memcpy, which will most likely be used mostly for max a few hundred bytes most of the time ![]() |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.