[Vm-dev] InterpreterSimulator

Levente Uzonyi leves at caesar.elte.hu
Tue Mar 15 14:32:25 UTC 2016


On Tue, 15 Mar 2016, Clément Bera wrote:

(no quote, sorry)

I've been thinking about adaptive PICs as well, and I came up with a 
scheme which has the overhead of one comparison and one write per lookup 
plus some extra cost when some maintenance is necessary, but the amortized 
overhead is still constant. The memory overhead can be as low as 8 bytes 
per PIC.
The scheme keeps track of the recently used branches, can detect and 
remove unused entries, reorder the branches based on recent usage, and 
even revert back to a CogMethod when there's only one entry left in the 
PIC.
I took a look at the code in VMMaker, but it didn't seem trivial to 
implement and test it myself, so if there's interest, I will write the 
details. Or if someone can explain how to add a fewextra bytes to the PIC, 
I will give it a try again.

Levente


More information about the Vm-dev mailing list