Papyrus: Speed of FormList.Find() vs Find(Array[])

Post » Tue Aug 27, 2013 5:29 am

Hey there.

In my mod I've got big FormLists (around 200-400 entries) containing armor records. They are prefilled in the CK (actually by a skyproc patcher to be more precise). I extensively have to use the function Items.find(kForm) where Items is a FormList.

Now I've recently found that arrays have a native Find function as well and I've often read that arrays are generally faster.

Does anyone know whether this holds true for the find functions as well?

I've been using arrays before but I didn't know about the Find function for arrays so I had to use a while loop for finding a specific entry. This was much slower compared to FormList.find().

To be clear: I don't add/remove anything at runtime from those formlists, I just use FormList.find(). Before I switch back to arrays I'd be grateful for some input. Thanks.

User avatar
stevie critchley
 
Posts: 3404
Joined: Sat Oct 28, 2006 4:36 pm

Return to V - Skyrim