tiny optimization to print standard inventory rule#178
tiny optimization to print standard inventory rule#178zedlopez wants to merge 1 commit intoganelson:masterfrom
Conversation
|
Does this not.. increase the scope to things which aren't held? You guys are the experts, this just seems to be highly unspecific |
|
If you look at the whole rule, you'll see that the following (unchanged) line is to set marked-for-listing on all held things. In general, operations that care about marked-for-listing start with unsetting marked-for-listing everywhere. And in particular, preserving the prior marked-for-listing-ness of unenclosed things isn't relevant here. So testing each thing for enclosure just burns cycles to no end. (Also, this change doesn't alter the output of Inform's whole test suite.) |
|
We should note that for some constructions, Inform compiles a more efficient (Arguably Inform should compile "all things enclosed by the player..." as a recursive objectloop call. That would be more efficient in a large game. But it does not currently work this way!) |
Changes
'now all things enclosed by the player are unmarked for listing;`
to
'now all things are unmarked for listing;`