ID:2169571
 
(See the best response by Ter13.)
I'm wondering if there are any differences between storing regular, datum-derived information in a list versus something like content, such as icon files or sounds. Would it be more efficient to initialize lists of multimedia content in a central location, like a master sound library, which either proc call constructs the lists as needed, or stores them as centralized variables?


I ask because resources seem to be handled differently than datums in DM, so it may be that they are also stored differently. The practical application would be to pick() a random content file from a list of stored possibilities for whatever may be wanted at the time. What's the proper way of doing this?
I'm not sure I understand what you mean.
Is there a difference between:
list('example_icon1.dmi','example_icon2.dmi')
and
list("example_string1","example_string2")
when it comes to performance and memory usage?
Best response
No.

BYOND's data types are all pointers to lookup tables. Any differences between data types are minimal enough to not matter.
Thanks, Ter. That's exactly what I wanted to know.
A single-quoted string will include the resource in your compilation; a double-quoted one will not. That may be of importance, depending on your goals. If you single-quote the file somewhere else then you're probably fine.
Good information, thank you.