[webkit-changes] [WebKit/WebKit] f5a9b7: [JSC] Use quadratic-probing in PropertyTable

Yusuke Suzuki noreply at github.com
Wed Feb 8 13:14:41 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f5a9b7f2385a5386bf94ab68ca3f2e8df3374f21
      https://github.com/WebKit/WebKit/commit/f5a9b7f2385a5386bf94ab68ca3f2e8df3374f21
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-02-08 (Wed, 08 Feb 2023)

  Changed paths:
    M Source/JavaScriptCore/runtime/PropertyTable.h

  Log Message:
  -----------
  [JSC] Use quadratic-probing in PropertyTable
https://bugs.webkit.org/show_bug.cgi?id=251899
rdar://105156586

Reviewed by Keith Miller and Michael Saboff.

This patch makes PropertyTable better with two changes.

1. `reinsert` should not do key comparison. `reinsert` happens only when we insert already hash-consed keys. This
   means any keys should not be equal. This makes loop of `reinsert` significantly simpler.
2. This patch integrates quadratic-probing into our PropertyTable instead of linear-probing. This works much better
   for objects with many keys. This improved JetStream2/json-stringify-inspector by 2.24%. And JetStream2/string-unpack-code-SP
   also gets better by 2.07%.

* Source/JavaScriptCore/runtime/PropertyTable.h:
(JSC::PropertyTable::findImpl):
(JSC::PropertyTable::reinsert):

Canonical link: https://commits.webkit.org/260031@main




More information about the webkit-changes mailing list