diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-12-05 17:34:08 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-12-05 17:34:08 -0300 |
commit | b4b616bdf2beb161b89930cc71a06936e8531b2c (patch) | |
tree | 0b0842e358206fba5273821ac885e063eddd4537 /lvm.c | |
parent | bb93f04d87cfc093757dc712905e1fe3fbe65f58 (diff) | |
download | lua-b4b616bdf2beb161b89930cc71a06936e8531b2c.tar.gz lua-b4b616bdf2beb161b89930cc71a06936e8531b2c.tar.bz2 lua-b4b616bdf2beb161b89930cc71a06936e8531b2c.zip |
Rehash reinserts elements with "lighter" functions
When reinserting elements into a table during a rehash, the code does
not need to invoke all the complexity of a full 'luaH_set':
- The table has space for all keys.
- The key cannot exist in the new hash.
- The keys are valid (not NaN nor nil).
- The keys are normalized (1.0 -> 1).
- The values cannot be nil.
- No barrier needed (the table already pointed to the key and value).
Diffstat (limited to 'lvm.c')
0 files changed, 0 insertions, 0 deletions