<div dir="ltr">Hi Nicolas,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 22, 2013 at 12:58 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Well, it&#39;s probable that all these indirections were too much, but restoring the primitive makes a difference with this mini-benchmark under interpreter VM:<br>
<br>| text |<br>text := Compiler evaluate: (FileStream fileNamed: &#39;<a href="http://text.st" target="_blank">text.st</a>&#39;) contentsOfEntireFile.<br>
MessageTally spyOn: [[100 timesRepeat: [(NewParagraph new)<br>        compose: text<br>        style: TextStyle default copy<br>        from: 1<br>        in: ( 0@0 corner: 569@9999999)]] timeToRun ].<br><br></div>with text extracted from &quot;Working With Squeak&quot; workspace, goes from 713ms down to 261ms with the primitive.<br>

So it might be worth until you come with something better...<br></div><br></div>For COG, the same bench goes from 65ms to 49ms, so the primitive is not really necessary.<br></div>I&#39;m pretty sure that Spur will change the numbers in favour of image-side code.<br>
</div></blockquote><div><br></div><div>Hmm, we need to be careful here.  Spur should speed up allocations, which include blocks, and at:put: on Arrays &amp; Strings, etc, and garbage collection, but it doesn&#39;t speed up the basic execution engine.  So I doubt that it&#39;ll be any faster in Spur since the loop probably isn;t doing any allocations or at:put:&#39;s, right?</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">2013/10/22 tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>&gt;</span><br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On 22-10-2013, at 7:01 PM, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
<br>
&gt; +     map := aFont characterToGlyphMap.<br>
<br>
</div>Do we actually want this still? I know it is needed in terms of the ivar ordering, but that&#39;s a pity since it is a waste of time in all the cases I know about.<br>
<br>
It&#39;s almost certainly an improvement to get the prim running again, but overall I *think* we&#39;d do better by adding a new prim to BitBltPlugin, to sit alongside the primitiveDisplayString (which I see also requires a characterToGlyphMap at the moment. That way the bitbltplugin effectively becomes our StrikeFont renderer in the same fashion as the FreeTypePlugin works for FreeType fonts.<br>


<br>
Has there ever been a case where that map was not effectively an identity map? I can see that there might be some appeal to mapping several characters to one glyph (like all non-printables to a null glyph) but has it ever been done that way?<br>


<br>
This ties in with the two mantis reports I mentioned last night -<br>
<a href="http://bugs.squeak.org/view.php?id=1372" target="_blank">http://bugs.squeak.org/view.php?id=1372</a><br>
and<br>
<a href="http://bugs.squeak.org/view.php?id=1342" target="_blank">http://bugs.squeak.org/view.php?id=1342</a><br>
since it would affect how we implement solutions.<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" target="_blank">http://www.rowledge.org/tim</a><br>
Is reading in the bathroom considered Multi-Tasking?<br>
<br>
<br>
<br>
</blockquote></div><br></div>
</div></div><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>