Does list processing loop through all things?

I’m curious to know if “under the hood” for a statement like “[list of things in x]”… does this list “already exist” in the object “x”, or does inform have to loop through all things in the game because the “being in x property” is stored in the thing, not x? Hopefully that made sense… basically, I’m just wondering if asking for lists of things is a performance killer in a large game because inform is having to loop through everything in the game to get the list or not.

Getting a list of things matching a certain condition runs through all things. If you use a kind more specific than “thing”, it only runs through things of that kind, but that won’t help in your game.

There is a faster way to do it, but it requires I6 to activate it. If you’re still using 6G60, you can include Large Game Speedup by Andrew Plotkin and get “the list of things *in X”.

The compiler is somewhat inconsistent about optimizing this.

If “crate” is a container, “repeat with T running through things in the crate…” will efficiently loop through the contents. “say “[list of things in the crate].”” will loop through all objects. “now all things in the crate are …” will also loop through all objects.

It turns out that, in a game with hundreds of objects, there are worse performance killers in the standard library. (Mostly in the “LOOK” action.)

Hm, that’s interesting that repeat loops work efficiently. That might let me continue what I’m working on at least in a “personal alpha” form for the time being by at least fixing some of my current problems. I think my application running fast enough not to annoy players to tears (it takes 4 seconds to parse most commands right now!) is going to rely on your extension zarf… I mentioned in the other thread I’m interested, but I’m stubborn and insisting to keep with L602, so I’ll be patient and wait for the magic!