[Vm-dev] Primitive replaceFrom:to:with:startingAt: in the JIT

Clément Bera bera.clement at gmail.com
Thu Dec 28 08:01:38 UTC 2017


On Thu, Dec 28, 2017 at 12:03 AM, tim Rowledge <tim at rowledge.org> wrote:

>
>
> > On 27-12-2017, at 2:56 PM, Clément Bera <bera.clement at gmail.com> wrote:
> >
> >
> > Assembling a word when reads are not aligned with the writes seemed
> tedious - not sure if that's the best time invested/speed-up ratio. One
> could experiment.
> >
> It’s just an  8bpp bitblt on a single line. We kinda-sorta have code for
> that lying around.
>
> How about handling any simple cases you can come up with and failing to
> the (usually) intrinsic memcpy() ? Take advantage of those 4 people’s
> months of work!
>

We can't do that. Unfortunately our primitives allow things that memcopy
does not such as:

array := ByteArray new: 1000.
array at: 1 put: 255.
array replaceFrom: 2 to: 500 with: array startingAt: 1.
array at: 501 put: 42.
array replaceFrom: 502 to: 1000 with: array startingAt: 501.

Or we detect aliasing and fall back to C code if there is aliasing ...

...


>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> All programmers are playwrights and all computers are lousy actors.
>
>
>


-- 
Clément Béra
Pharo consortium engineer
https://clementbera.wordpress.com/
Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20171228/ecd149e8/attachment-0001.html>


More information about the Vm-dev mailing list