[virtmach] parrot VM?

Manoj Plakal virtmach@iecc.com
Sun, 14 Jul 2002 05:50:41 -0500


Anton Ertl wrote (Sun, Jul 14, 2002 at 09:01:39AM +0200) :
> Norman Ramsey wrote:
> > The Lua implementors (www.lua.org) claim to have got a performance
> > improvement by switching from a stack vm to a register vm (with
> > effectively infinitely many registers).
> 
> If you remember where you read about the Lua register VM, I would
> appreciate a reference.  Thanks in advance,

	From the lua mailing list archives:
           http://groups.yahoo.com/group/lua-l/message/4900
           http://groups.yahoo.com/group/lua-l/message/4531
           http://groups.yahoo.com/group/lua-l/message/4544

        I browsed through the lua-4.0.1 sources. It
	does seem to be a register VM now. The 
	instruction format allows specifying two
	integers in addition to the opcodes, and
	these are used to access local vars by indexing
	into the single execution stack, thus 
	allowing effectively infinite regs as
	Norman pointed out. The HISTORY file
	mentions a 20% speedup due to the VM change
	and this might be because earlier
	local var access required extra instructions
	(as pointed out in one of the above messages).
	
	Manoj