<div dir="ltr"><div>Hello,</div><div><br></div><div>I was considering counters in the PICs not necessarily to reorder the PIC but also to make available the frequency information of each different types available to the sista optimizer, in a similar way to the Dart VM where a lot of profiling information is available. Two cases then comes to mind, specializing the code only for the most frequently used type and compile the fall back for least recently used types or generate optimized code with prefilled inlined cache, including PICs in the correct order, on optimized code. Obviously that&#39;s quite some work, so we have to measure what we would really earn.</div><div><br></div>As Eliot mentioned, the counters cannot be inlined in the PIC as each time one modifies the machine code the cpu instruction cache line is flushed, so inlined counters implies a huge slow down. The divide by 2 idea sounds cool though. I was also thinking that the housekeeping could happen during machine code garbage collection, as the PIC is moved anyway, reordering at that time might be cheaper.</div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-16 2:19 GMT+01:00 Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 15, 2016 at 1:15 PM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>On 15.03.2016, at 20:28, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;  #(1.0 #one &#39;one&#39; #[1]. $1. #(1))<br>
<br>
#(1.0 #one &#39;one&#39; #[1]. $1. #(1)) size<br>
==&gt; 8<br>
<br>
(not 6 as intended)<br>
<br>
- Bert -<br></blockquote><div><br></div><div>Thanks, Bert.  If one corrects there&#39;s no significant change, so the figures are still representative.  Reproducible times on a Mac would be nice to have... ;-)  I can get two congruent runs, but timing is all over the place by the third run :-(</div><div><br></div></div><div><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>
<br></blockquote></div><br></div>