[MLton-devel] eliminating HandlerPush/Pop

Stephen Weeks MLton@mlton.org
Fri, 10 Jan 2003 10:42:53 -0800


> I'm amazed that the result was an improvement for count-graphs.  I'm
> not surprised that it showed the largest effect, but that the effect
> was good.

There is a potential win with -handlers flow over -handlers pushpop
because the latter is really stupid about the link/slot.  It will naively
save and restore it even when unnecessary.  E.g, for

	HandlerPush L_1
	...
	HandlerPop L_1
	...
	HandlerPush L_2
	...
	HandlerPop L_2

will generate code like

	SetSlotExnStack
	SetExnStackLocal
	SetHandler L_1
	...
	SetExnStackSlot
	...
	SetSlotExnStack
	SetExnStackLocal
	SetHandler L_2
	...
	SetExnStackSlot

Obviously, the following would be better

	SetSlotExnStack
	SetExnStackLocal
	SetHandler L_1
	...
	...
	SetHandler L_2
	...
	SetExnStackSlot

And this is closer to what -handlers flow will do.


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel