ID:162036
 
What are the true upper limits on the number of entries a list in BYOND can have?

Right now I am contemplating the creation of a list that spans 68,250,000 entries, for each level.

If I kneecap myself to allowing 20 running levels in the world (which probably wouldn't happen in most cases anyway so it's not too big of a deal), that's about 1,365,000,000 list entries.

I've heard 4 Billion is the limit on the number of entries which should be enough, but I'm not sure. Maybe it's more. It should be.
There can be 65535 instance of the /list object, but the actual contents of the list are rather large. Of course, if you're storing /atoms in the list, there 65535 instance of the object, and you can only store 65535 strings (with 65535 characters). /datums have a much higher limit. If you're storing only numbers, though, you can have a lot of elements in a list.
In response to Popisfizzy
How about if each entry references an entry of another list that references an object.
Obs wrote:
What are the true upper limits on the number of entries a list in BYOND can have?

Right now I am contemplating the creation of a list that spans 68,250,000 entries, for each level.

If I kneecap myself to allowing 20 running levels in the world (which probably wouldn't happen in most cases anyway so it's not too big of a deal), that's about 1,365,000,000 list entries.

I've heard 4 Billion is the limit on the number of entries which should be enough, but I'm not sure. Maybe it's more. It should be.

A little over 4 billion is the limit supported in internal code for list length. The actual realistic limit is around 16.7 million because past that point, you can't use integers to refer to an index in the list. However at this point you'd also be using incredible gobs of memory. 68.25 million numbers in a list equals over 341 million bytes in BYOND.

A huge question I have here is, what would you need over 68 million list entries for at all, let alone per level? A number like that is usually a red flag in the design process that indicates you should be approaching a problem differently. It's hard to say what the best approach is, though, without knowing the nature of the problem.

Lummox JR
In response to Lummox JR
I was going to try to make a really complex indexing system that required a sort of 4 dimensional array. But I see now I wouldn't even have enough integers to access the members of such a hypothetical list so the idea is left for dead.




But I do have another question about limits. I know turfs are limited in the billions, objects, mobs, images, in the 65535s, but what about newly created datatypes?

Also, what is the limit on flicked images at any one time, and is there a way to keep a flicked image spawned forever? Because I noticed if their duration is set to loop, they do not in fact loop when they are flicked. ***But actually this kind of thing with flicks isn't a big deal. I was just wondering for experimentation purposes.