Performance Best Practices

I’ll post a couple of things I noticed while working on my CYOA extension and which come from another thread about lists VS tables:

"My own test showed writing data to a huge list was considerably slower than doing so in a table with the same number of entries. I should have written this stuff down… you know, I did 100 and 1000 and maybe 10,000. Somwehere between 100 as we moved up towards 10,000, the list time overtook the table time very significantly. But that’s just building the list. (EDIT - this was significant for me because I had data structures I was rebuilding every turn from scratch. Later I switched to monitoring more of the project’s state so that the extension defaulted to NOT rebuilding every turn, but rebuilding only when particular changes occurred.)

Someone else here recently showed that looking things up in tables, especially if items were near the end, was surprisingly taxing. But that may have only been a surprise relative to what was expected : )"

The original thread was https://intfiction.org/t/i7-lists-or-table/9726/3

-Wade

EDIT PS: Also, regular expressions. Minimise them and be specific with them, and use lower-powered built-in Inform equivalents to either replace them, or screen for the need to use them, when possible.