Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 54a3720b4ec1ddcf0207d5f3507e0608149c0ad1
https://github.com/WebKit/WebKit/commit/54a3720b4ec1ddcf0207d5f3507e0608149c0ad1
Author: Yusuke Suzuki <[email protected]>
Date: 2026-10-11 (Sun, 11 Oct 2026)
Changed paths:
M Source/JavaScriptCore/runtime/WeakMapImpl.cpp
M Source/JavaScriptCore/runtime/WeakMapImpl.h
M Source/JavaScriptCore/runtime/WeakMapImplInlines.h
Log Message:
-----------
[JSC] JSWeakMap / JSWeakSet should have inline buffer
https://bugs.webkit.org/show_bug.cgi?id=327087
rdar://189703653
Reviewed by Sosuke Suzuki.
When JSWeakSet / JSWeakMap are created, it is having some elements, but
it rarely exceeds the initialCapacity = 4. This patch adds inline buffer
for them for initialCapacity = 4 size, which covers ~90% use patterns.
* Source/JavaScriptCore/runtime/WeakMapImpl.cpp:
(JSC::WeakMapImpl<WeakMapBucket>::visitChildrenImpl):
(JSC::WeakMapImpl<WeakMapBucket>::estimatedSize):
* Source/JavaScriptCore/runtime/WeakMapImpl.h:
(JSC::WeakMapImpl::~WeakMapImpl):
(JSC::WeakMapImpl::inlineBuffer const):
(JSC::WeakMapImpl::hasOutOfLineBuffer const):
(JSC::WeakMapImpl::makeAndSetNewBuffer):
* Source/JavaScriptCore/runtime/WeakMapImplInlines.h:
(JSC::WeakMapImpl<WeakMapBucket>::rehash):
Canonical link: https://commits.webkit.org/323380@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications