Jump to content

One long list or multiple shorter ones?


ChinRey
 Share

You are about to reply to a thread that has been inactive for 2288 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

This is probably extreme micro-optimization but I'm working on a texture changer for a tree. There are two different sets of textures, one set for the foliage and one for the bark. Is it better to have one long list containing all the texture names and UUIDs or a separate list for each?

Link to comment
Share on other sites

I have done it both ways but, frankly, have never based my choice on how it might optimize the script's speed or memory allocation.  As far as I am concerned, I construct lists on the basis of how easily I can handle them without getting my brain all tangled up in index issues. If I have to write complex code to keep track of which list element is which, I am more likely to make mistakes and raise my blood pressure than  if I opt for a simpler code.  I suppose in the end that my script is "optimized" if it works accurately with minimal hassle. B|

  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2288 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...