Major performance problem with std.array.front()
H. S. Teoh
hsteoh at quickfur.ath.cx
Thu Mar 6 22:12:38 PST 2014
On Thu, Mar 06, 2014 at 08:19:18PM -0800, Walter Bright wrote:
> On 3/6/2014 8:01 PM, Adam D. Ruppe wrote:
> >BTW you know what would help this? A pragma we can attach to a struct
> >which makes it a very thin value type.
>
> I'd rather fix the compiler's codegen than add a pragma.
[...]
>From what I understand, structs are *supposed* to be thin value types. I
would say that if a struct is under a certain size (determined by the
compiler), and doesn't have complicated semantics like dtors and stuff
like that, then it should be treated like a POD (passed in registers,
etc).
T
--
Ruby is essentially Perl minus Wall.
More information about the Digitalmars-d
mailing list