justin = {
main feed
,
music
,
code
= {
cockos
,
reaper
,
wdl
,
ninjam
,
jsfx
,
more
}
,
askjf
,
pubkey
};
Ask Justin Frankel
No reasonable question unanswered since 2009!
Suggested topics: programming, music, sleep, coffee, etc.
Note: please do not ask questions about REAPER features, bugs or scheduling, use the
forums
instead.
Name:
Ask:
Human (enter yes):
[
back to index
] | [
unreplied
] | [
replied
] | [
recent comments
] | [
all
]
Question:
Can you talk a little bit about structure/byte alignment, why it's important, and how to test you're doing it right when programming to get the best performance?
Asked by Will (70.173.80.x) on January 18 2014, 7:41am
Reply on January 18 2014, 10:22pm:
For the most part the compiler should have reasonable defaults, unless you're using SSE, or doubles with gcc and can't set -malign-double (ugh!). For the latter case I made a macro called WDL_FIXALIGN, which I apply to double/int64 members of structs when the alignment is uncertain. One thing I should mention: if you have classes with virtual functions, remember the implicit vtable pointer (which on 32 bit platforms can mean being only 4 byte aligned rather than 8 byte aligned)!
Comment:
Your Name:
-- Site Owner's Name:
(for human-verification) Comment:
[
back to index
] | [
unreplied
] | [
replied
] | [
recent comments
] | [
all
]
Copyright 2025 Justin Frankel
.
|
RSS