Dynamic arrays allocation size
"Luís
"Luís
Tue Mar 26 18:08:50 PDT 2013
On Wednesday, 27 March 2013 at 00:32:12 UTC, Brad Roberts wrote:
> Either way, it's the trade off that's been made, and it's not
> likely to change.
Sure, I was not arguing for changing that. I just wanted to
clarify that when you say that "D explicitly ignores platforms
with odd sizes" that does not mean that D cannot be implemented
on these other machines, only that there might be a performance
penalty (as had to be the case, given Turing et al...), depending
on the exact circumstances.
What might actually be cooler would be being able to define your
own types (though I don't expect that idea to be adopted soon,
either), with their own properties, such as having ints that
saturate instead of wrapping (like MMX), with different numbers
of bits, etc. On a good compiler some of those alternative types
would allow exploiting nice machine properties, and would
complement the benefits of having the standard types, the same
way pointers complement arrays. And you could actually define the
C types on platforms where they don't match with the D types, as
I pointed out earlier in this thread.
More information about the Digitalmars-d
mailing list