flat assembler
Message board for the users of flat assembler.
Index
> Main > Optimal String Alignment? |
Author |
|
vid 31 Dec 2006, 09:14
i'd say that there is no need to align your strings at all.
|
|||
31 Dec 2006, 09:14 |
|
donkey7 31 Dec 2006, 12:06
i think alignment is useful when you are using widechar format (ie. aligning to word boundary).
|
|||
31 Dec 2006, 12:06 |
|
vid 31 Dec 2006, 12:18
donkey7: sure, i forgot that. What i meant is that natural alignment is enough (bytes unaligned, words aligned to 2, dwords to 4 etc). 16byte alignment makes sense with code, and 4096 only when the speed gain is worth of memory waste
|
|||
31 Dec 2006, 12:18 |
|
Big Red 03 Jan 2007, 04:32
Alright then, thank you. I'll take your word for it and leave them unaligned.
|
|||
03 Jan 2007, 04:32 |
|
f0dder 03 Jan 2007, 06:30
If that you have long zero-terminated strings and use one of the dword-scanning strlen algorithms, 4-byte aligning the strings is a good idea. Of course an even better idea is to store string-lengths when necessary instead of doing a strlen, but that's not always possible.
|
|||
03 Jan 2007, 06:30 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.