Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Passing small structs in C

Name: Anonymous 2013-07-28 13:51

Hi prog. Got a C89 problem.

I want to pass small (less than 64B) structs throught functions that I can't inline because they are used several times elsewhere and are quite big. But it still need it to be very fast.

Should I pass the structs directly (thus copying them) or use a pointer (and getting a dereference penalty) ?

Name: Anonymous 2013-07-28 19:04

>>5
You don't know shit then. MSVC, GCC, and Clang will pack structs into registers on unexported/hidden functions for x64 and other platforms like ARM/ARM64.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List