[phobos] byte alignment for arrays
Steve Schveighoffer
schveiguy at yahoo.com
Tue Jun 29 10:24:19 PDT 2010
No, it should never change. If it changes, then it's a runtime value, and that hurts performance.
In that case, what should it be? 16 on 32-bit is a given, what about 64-bit?
-Steve
----- Original Message ----
> From: Sean Kelly <sean at invisibleduck.org>
> To: Discuss the phobos library for D <phobos at puremagic.com>
> Sent: Tue, June 29, 2010 12:48:39 PM
> Subject: Re: [phobos] byte alignment for arrays
>
> I think it should be enough just to make it a documented requirement for
> allocators. It's not like it will ever change, right?
On Jun 28,
> 2010, at 2:07 PM, Steve Schveighoffer wrote:
> All,
>
>
> Should there be something in the runtime that defines the minimum align size for
> things like memory blocks? That might make this easier to deal with from a
> design perspective...
>
> ----- Original Message ----
>>
> From: Jason Spencer <
> href="mailto:spencer8 at sbcglobal.net">spencer8 at sbcglobal.net>
>>
>
>> Hmmm. The natural thing would be to have some type to
> describe these
>> 128-bit values (akin to __m128 in gcc, Intel and MS
> compilers) and use sizeof on
>> that. I don't see that D has any
> MMX/SSE intrinsics, so I don't know if
>> there is a standard
> type. If you don't have such a thing defined by the
>> compiler,
> I'd be tempted to define it, based on which version of the compiler
>>
> will compile this code (i.e. 32- or 64-bit dmd). Then you can use that in
>
>> your sizeof. Maybe you'll get lucky, and that will become
> standard
>> :)
>
>
>
>
>
> _______________________________________________
> phobos mailing
> list
>
> href="mailto:phobos at puremagic.com">phobos at puremagic.com
>
> http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________
phobos
> mailing list
> href="mailto:phobos at puremagic.com">phobos at puremagic.com
> href="http://lists.puremagic.com/mailman/listinfo/phobos" target=_blank
> >http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list