[squeak-dev] The Trunk: Graphics-nice.274.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Oct 22 19:58:25 UTC 2013


Well, it's probable that all these indirections were too much, but
restoring the primitive makes a difference with this mini-benchmark under
interpreter VM:

| text |
text := Compiler evaluate: (FileStream fileNamed: 'text.st')
contentsOfEntireFile.
MessageTally spyOn: [[100 timesRepeat: [(NewParagraph new)
        compose: text
        style: TextStyle default copy
        from: 1
        in: ( 0 at 0 corner: 569 at 9999999)]] timeToRun ].

with text extracted from "Working With Squeak" workspace, goes from 713ms
down to 261ms with the primitive.
So it might be worth until you come with something better...

For COG, the same bench goes from 65ms to 49ms, so the primitive is not
really necessary.
I'm pretty sure that Spur will change the numbers in favour of image-side
code.


2013/10/22 tim Rowledge <tim at rowledge.org>

>
> On 22-10-2013, at 7:01 PM, commits at source.squeak.org wrote:
>
> > +     map := aFont characterToGlyphMap.
>
> Do we actually want this still? I know it is needed in terms of the ivar
> ordering, but that's a pity since it is a waste of time in all the cases I
> know about.
>
> It's almost certainly an improvement to get the prim running again, but
> overall I *think* we'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.
>
> 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?
>
> This ties in with the two mantis reports I mentioned last night -
> http://bugs.squeak.org/view.php?id=1372
> and
> http://bugs.squeak.org/view.php?id=1342
> since it would affect how we implement solutions.
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Is reading in the bathroom considered Multi-Tasking?
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131022/e0f0c782/attachment.htm


More information about the Squeak-dev mailing list