drastic slowdown for copies

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 28 14:27:41 PDT 2015


16 bytes is 64 bit - the same size as a reference. So copying it 
is overall a bit less work - sending a 64 bit struct is as small 
as a 64 bit reference and you don't go through the pointer.

So up to them, it is a bit faster.


Add another byte and now the copy is too big to fit in a 
register, so it needs to spill over into somewhere else which 
means a bunch more work for the cpu.


More information about the Digitalmars-d-learn mailing list