Using physical relations for other purposes

I’ve begun refactoring Flexible Windows: github.com/i7/extensions/blob/m … indows.i7x

My initial changes have been to turn the spawning relationship into an alias of containment. This has resulted in a 30x speed improvement. To do this I needed to make g-windows into a subkind of containers.

Are there any downsides in this kind of approach? Victor suggested it might be a problem if you loop through containers, but that seems to me to be a fairly obscure thing to do.

Or, are there ways to get the speed of world model relations for other relations?

I suspect low-level relations like this are hard-coded at the I6 level for speed of looping and the like. I ran into something similar, but in reverse—a slowdown—when I tried making quips into objects rather than things in Threaded Conversation. (Yes, I will get back into that this year)

Physical relations are privileged in the Z-Machine as they’re part of the VM architecture. They aren’t in Glulx, so any other equivalent (one-to-various) relations should be equally efficient. But Inform currently uses very different code for physical relations.