ZipPy status update
Chris Seaton
chris at chrisseaton.com
Sat Dec 21 04:33:15 PST 2013
What is the minimal benchmark where you think it's most obvious that
Truffle isn't giving the performance that it should, and how do I run it?
Preferably something numerically intensive, as I know that works well in
ZipPy and RubyTruffle, but minimal is also important.
Chris
On 21 December 2013 12:16, Stefan Marr <java at stefan-marr.de> wrote:
> Hi Chris:
>
> On 21 Dec 2013, at 12:59, Chris Seaton <chris at chrisseaton.com> wrote:
>
> > I avoid materialising the frame where I know no local variables from the
> declaring scope are used, but apart from that I haven't been worrying about
> the performance impact yet. Your idea of making your own explicit up-values
> sounds interesting, but I wonder if that's working around Truffle rather
> than working with it. You will miss out on any performance improvements to
> MaterializedFrame in the future, and you’ll have more complex code.
>
> I guess, I can revert it then and add materializing on demand instead.
> But, that’s not going to fix my performance problems. Which are, from what
> I have seen in SimpleLanguage and ZipPy kind of mysterious.
>
> > In Ruby I also plan to inline all trivial methods immediately - but at
> the moment I'm only doing it for getters, setters and all core methods. One
> problem - if you inline straight away how do you stop the number of nodes
> blowing up beyond the limit?
>
> I actually haven’t inlined getters and setters automatically yet. Just
> literals and reads of globals. So, there is no node explosion.
>
> > In Ruby I use @ImplicitCast to convert between RubyFixnum and int. There
> is no difference between these two types - the RubyFixnum version is just
> so I can have a real object sometimes to simplify some other code. This
> tells the DSL whenever you see a RubyFixnum, feel free to convert it to an
> int to make things work.
> >
> > @ImplicitCast
> > public int unboxFixnum(RubyFixnum value) {
> > return value.getValue();
> > }
>
> That’s exactly what I am doing in TruffleSOM:
>
> @ImplicitCast
> public int castInteger(final SInteger i) {
> return i.getEmbeddedInteger();
> }
>
> @ImplicitCast
> public BigInteger castBigInteger(final SBigInteger i) {
> return i.getEmbeddedBiginteger();
> }
>
> @ImplicitCast
> public String castString(final SString str) {
> return str.getEmbeddedString();
> }
>
> @ImplicitCast
> public double castDouble(final SDouble d) {
> return d.getEmbeddedDouble();
> }
>
> Best regards
> Stefan
>
> --
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> http://soft.vub.ac.be/~smarr
> Phone: +32 2 629 2974
> Fax: +32 2 629 3525
>
>
More information about the graal-dev
mailing list