Hi Alexandre,

On Fri, Oct 23, 2015 at 2:18 PM, Alexandre Bergel <alexandre.ber...@me.com>
wrote:

> Hi!
>
> It is known that increasing data locality is a good way to benefit from
> CPU caches. There has been some effort from the IBM’s JVM crew that aligns
> some frequently accessed variables at a particular offset to improve
> accesses. Would this approach works in Pharo?
>
> Other similar situation: will the expression “Object new yourself” be
> faster if the object (i.e., result of Object new) is physically close to
> the class Object in memory?
>

Clément and I have discussed this issue.  It's one significant advantage
that a conventional procedural language has over an OO one.  Compare some
rendering pipeline that in its OO version has to traverse deep object
structure to dig out parameters as opposed to some array based
implementation where the parameters are extracted out into separate arrays
and hence the traversal is much simpler.

I doubt that some minor rearrangement or alignment of structure would make
any difference.  But imagine an adaptive optimizer for data structure that
could make the same transformation, automatically and invisibly to the
programmer.  Such a general purpose optimizer would be far more powerful.
That's the kind of solution we think will be tried and that we would try if
we encountered such performance issues and we had time to address it.

But I think this is beyond the current state of the art and it feels like a
PhD topic.  I do remember Yoshiki saying that some plugin was doing
something similar, but I could be mistaken.


> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>


-- 
_,,,^..^,,,_
best, Eliot

Reply via email to