Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Re: OCaml speed
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ken Rose <kenarose@e...>
Subject: Re: [Caml-list] Re: complex bigarrays
Thorsten Ohl wrote:

> AFAIK, the C compiler is free to pad structures for better alignment,
> resulting in better performance.  Isn't it even free to reorder
> elements?

No, it's not free to reorder them.  C89, section semantics,
paragraph 9

"Within a structure object, the non-bit-field members and the units in
which bit-fields reside have addresses that increase in the order in
which they are declared."

They can be padded anywhere except at the beginning.

 - ken
Bug reports:  FAQ:
To unsubscribe, mail  Archives: