[Webkit-unassigned] [Bug 219285] WTF::StringImpl is not thread-safe

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 27 07:32:22 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=219285

--- Comment #1 from Chris Lord <clord at igalia.com> ---
Using a very simple ref/deref benchmark on StringImpl, changing m_refCount to std::atomic<unsigned> makes it run at about 35% of current speed on a release build on this Xeon machine. Making refs use relaxed memory ordering makes that 40%, making them both relaxed to gauge what a GC thread might give us in terms of ref/deref perf increase is about the same (which surprised me a bit...)

Switching to an atomic ref count has a significant hit, the question will be how significant is it on real-world use-cases, once code has been refactored to take into account that Strings can be shared across threads now...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201127/552dd45b/attachment.htm>


More information about the webkit-unassigned mailing list