3d vector struct

Marco Leise Marco.Leise at gmx.de
Thu Feb 6 20:04:23 PST 2014


Am Mon, 03 Feb 2014 22:01:14 +0000
schrieb "Stanislav Blinov" <stanislav.blinov at gmail.com>:

> Return-by-value being optimized as a move might be one more 
> reason why you would like to use slices instead of variables to 
> store coordinates (since that would mean just moving a pointer 
> and a size_t), but that might have to wait until custom 
> allocators finally arrive.

3 doubles is only one machine word more than an array slice
and there are no indirections, allocations and length
attribute to deal with (which is always 3 here).

-- 
Marco



More information about the Digitalmars-d-learn mailing list