<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 30 March 2014 13:39, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 3/29/2014 8:06 PM, deadalnix wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
On Sunday, 30 March 2014 at 01:42:24 UTC, Walter Bright wrote:<br>
</div><div class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
True, but why is this a problem?<br>
</blockquote>
Higher memory consumption, less objects fitting in cache, more scanning to do<br>
for the GC.<br>
</div></blockquote>
<br>
Debatable. All fields that are interface references would double in size.<div class=""><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

and you don't need cascaded load to call methods.<br>
</blockquote>
<br>
True, but on the other hand, it takes up 2 registers rather than one, costing<br>
twice as much to copy around, store, pass/return to functions, etc.<br>
</blockquote>
<br>
Two pointers structs are passed in register, which is fast. If that spill, that<br>
spill on stack, which is hot, and prefetcher friendly.<br>
</blockquote>
<br></div>
That underestimates how precious register real estate is on the x86.</blockquote><div><br></div><div>This is only a concern when passing args. x86 has huge internal register files and uses aggressive register renaming, for the last decade or so.</div>
<div>The only time when the number of named registers is significant these days is the fastcall calling convention (standard on x64), since functions need to expect it's arg in an explicitly named register.</div><div>
x64 doubled the number of argument registers to help with this (still fewer than other arch's).</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On the other hand, the double indirection is very cache unfriendly.<br>
</blockquote>
<br></div>
I suspect that the results of all this will be some use cases go faster, other use cases go slower, a decidedly mixed result.<br></blockquote><div><br></div><div>The most interesting result of the change for me would be that it wouldn't break alignment.</div>
<div>But wrt performance, in my experience, i'm frequently worried about the indirection and potential cache miss. I can't imagine I'd often be so concerned about using an additional arg register. And that's more easily mitigated.</div>
</div></div></div>