aboutsummaryrefslogtreecommitdiff
path: root/ltm.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-11-29 17:26:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-11-29 17:26:20 -0300
commit002beeebe79065e03dd9f531bee367e8459e3f64 (patch)
tree5b066d30e08950c923c253ce85f702b39fbe9c31 /ltm.h
parent9329eeac3b7035c223d7a8b63dbde1f6db371bf5 (diff)
downloadlua-002beeebe79065e03dd9f531bee367e8459e3f64.tar.gz
lua-002beeebe79065e03dd9f531bee367e8459e3f64.tar.bz2
lua-002beeebe79065e03dd9f531bee367e8459e3f64.zip
New way to keep hints for table length
Instead of using 'alimit' for keeping the size of the array and at the same time being a hint for '#t', a table now keeps these two values separate. The Table structure has a field 'asize' with the size of the array, while the length hint is kept in the array itself. That way, tables with no array part waste no space with that field. Moreover, the space for the hint may have zero cost for small arrays, if the array of tags plus the hint still fits in a single word.
Diffstat (limited to 'ltm.h')
0 files changed, 0 insertions, 0 deletions