I believe that is correct. Inform 7 makes a linked list for each class to optimize this sort of loop, but Inform 6 values space more than time, so it doesn’t by default. It looks like o ofclass Monk simply runs through o’s property 2 (an additive property holding class objects) to see if Monk is listed in it, and this needs to be done for every o.
Yep! Dialog is marginally better: it optimizes objectloop (x in y)andobjectloop (x has y), and tries to compile more elaborate loops into one of those two forms. If there’s some property that never changes at runtime, for example, Dialog will try to turn it into an attribute so it can use the second form. But in the general case, it’s always looping over all objects in the game; there’s just no better way on the Z-machine.