flat assembler
Message board for the users of flat assembler.
Index
> Main > how to properly rotate buffer in a loop |
Author |
|
revolution 17 Jun 2016, 01:27
zhak wrote: I remember from optimization guides, that it's better to avoid conditions in loops. But I'm not sure if cmovcc is better than conditional flow in case branch prediction will predict "not taking the jump" most of the time. Number of iterations may vary. But most of the time I assume couple of hundreds. Thanks in advance! |
|||
17 Jun 2016, 01:27 |
|
bitRAKE 17 Jun 2016, 15:05
A very lazy way is to use a buffer twice the needed size. Only really better for common rotations, or block operations. Buffer appears always contiguous and there is a large penalty (full copy to start) for rotation at end.
|
|||
17 Jun 2016, 15:05 |
|
zhak 20 Jun 2016, 11:19
Yes, but I was implementing a function in UEFI style to return BUFFER_TOO_SMALL error and required buffer size on overflow. Decided to leave cmov for now. Will do some testing later, not a big change to make
|
|||
20 Jun 2016, 11:19 |
|
l4m2 23 Aug 2016, 04:20
For I didn't catch what you mean
|
|||
23 Aug 2016, 04:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.