[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Does the array part of a table ever shrink?
- From: Luther <lutheroto@...>
- Date: Wed, 29 May 2013 13:08:23 -0400
In a nutshell, my question is this: If I put lots of nils into a long
array, will the table move its elements to the hash part to save memory?
I'm implementing the Sieve of Eratosthenes. I have a table with indexes
2 through a length parameter all set to true, where the length is rarely
more than 1000, but it could be any positive integer. I then set most of
the indexes to false.
If I use nil instead of false, will it save memory, or will the array
allocation stay the same?
Luther