[SOLVED] Data Limit of Map Attribute.


  • Posts: 124

I was wondering if anybody knows what the data limit of a MAP attribute would.  I'm guessing it would be about 65k entries? Any concrete answers?


« Last Edit: May 14, 2018, 12:01:28 pm by bobbyck »


  • *
  • Posts: 4518
I guess your stab at 65k is assuming the map is bounded by an unsigned 16-bit integer in some way. While it's likely to be platform specific (if there is such a limit), I'd be more generous and assume something like 2 billion (2^31) since Haxe's Int is expressed as a signed 32-bit integer on the targets with native integer types. By that point, you're more likely to be running out of memory for your game to be running.

Basic map operations (get/set value) could perform worse based on the keys used to store data in the map, but assuming that the hashing function is well defined in general, and you aren't feeding it data based on explicit knowledge of the function in order to purposefully cause hash collisions, this isn't likely to be an issue.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)