Re: Bug: inserting nil values

  • From: Egor Skriptunoff <egor.skriptunoff@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sat, 23 Apr 2022 22:45:10 +0300

On Sat, Apr 16, 2022 at 4:39 AM Junlong li wrote:

Most of the time is spent on the rehash.


Exactly!
The bug leads to invoking rehash way too frequently.
Rehash is supposed to be invoked about O(log(tablesize)) times for the
whole table lifespan.
Due to the bug, rehash is invoked on almost every assignment of nil to a
non-existing key.

Other related posts: