Hi Dave,

Cool! Welcome! Is the code of that interpreter somewhere? I'd be happy to take 
a look at it and see whether there are obvious points of improvement. 

The next step is indeed to apply some of the other rpython hints, like promote, 
elidable, unroll_safe, declaring some instance fields to be immutable. When 
doing that, it's important to always start from small program examples, inspect 
the trace that the JIT generates for them, identify sources of slowness in the 
trace (allocations and calls are good candidates) and then adding hints to 
improve these. Also, always measure the time these microbenchmarks take, to see 
whether the new hints actually improved the time. It takes a bit of time to 
figure out what's the most effective way to apply these hints is.

This paper explains some of the hints:

https://dl.acm.org/doi/10.1145/2069172.2069181 

In this video I do this kind of work (using slightly idiosyncratic tools 
though):

https://youtu.be/fZj3uljJl_k

If you want to discuss these problems directly, please feel free to join our 
#pypy irc channel on libera.chat

Cheers, 

CF 

On July 4, 2023 11:33:37 PM GMT+02:00, dave.l...@bluewin.ch wrote:
>I've managed to write a small rpython interpreter, and the jit seems to be 
>working for both single loops and bridged loop nests. Does anyone have any 
>suggestions for what I should be looking at next?
>
>Is attempting to play with the structure of the interpreter worthwhile? Or 
>should I be looking to see which helper defs I can mark with the rpython 
>decorators? Or something else?
>
>Thanks
>-Dave
>_______________________________________________
>pypy-dev mailing list -- pypy-dev@python.org
>To unsubscribe send an email to pypy-dev-le...@python.org
>https://mail.python.org/mailman3/lists/pypy-dev.python.org/
>Member address: cfb...@gmx.de
_______________________________________________
pypy-dev mailing list -- pypy-dev@python.org
To unsubscribe send an email to pypy-dev-le...@python.org
https://mail.python.org/mailman3/lists/pypy-dev.python.org/
Member address: arch...@mail-archive.com

Reply via email to