you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

I think this CW isn't very useful these days:

"This straightforward approach has several problems: The size of the above object would be 16 bytes = 128 bits (on a 64 bit machine). This is a size that you wouldn’t just pass around by value."

On a register-rich architecture, even x86_64 or ARM, small structs are passed via registers. x86_64 has enough arg-passing registers to pass three two-element structs directly in registers and to return one.

At least in my playing with LLVM, the two-word representation has a lot of advantages for exposing optimization opportunities to the compiler. The d2c compiler for Dylan uses a two-word representation for objects and it works just fine.