REOPENED 194212
[JSC] Make StaticStringImpl & StaticSymbolImpl actually static
https://bugs.webkit.org/show_bug.cgi?id=194212
Summary [JSC] Make StaticStringImpl & StaticSymbolImpl actually static
Yusuke Suzuki
Reported 2019-02-03 22:48:15 PST
Let's try it and see the performance impact. It possibly reduces the memory footprint.
Attachments
Testing... (1.33 KB, patch)
2019-02-03 22:54 PST, Yusuke Suzuki
no flags
Patch (1.50 KB, patch)
2019-03-11 15:29 PDT, Yusuke Suzuki
mark.lam: review+
Yusuke Suzuki
Comment 1 2019-02-03 22:54:48 PST
Created attachment 361039 [details] Testing...
Daniel Bates
Comment 2 2019-02-03 23:11:03 PST
This would be the awesome!
Yusuke Suzuki
Comment 3 2019-03-11 15:27:46 PDT
*** Bug 195577 has been marked as a duplicate of this bug. ***
Yusuke Suzuki
Comment 4 2019-03-11 15:29:13 PDT
Mark Lam
Comment 5 2019-03-11 15:32:41 PDT
Comment on attachment 364300 [details] Patch r=me if this does not regress performance.
Yusuke Suzuki
Comment 6 2019-03-11 15:35:07 PDT
(In reply to Mark Lam from comment #5) > Comment on attachment 364300 [details] > Patch > > r=me if this does not regress performance. Yes, let's monitor the bots!
Yusuke Suzuki
Comment 7 2019-03-11 15:37:48 PDT
Radar WebKit Bug Importer
Comment 8 2019-03-11 15:43:36 PDT
Darin Adler
Comment 9 2019-03-11 16:05:14 PDT
(In reply to Yusuke Suzuki from comment #0) > Let's try it and see the performance impact. Waiting with bated breath. I would be super surprised if we don’t see performance impact.
Yusuke Suzuki
Comment 10 2019-03-11 19:19:30 PDT
(In reply to Darin Adler from comment #9) > (In reply to Yusuke Suzuki from comment #0) > > Let's try it and see the performance impact. > > Waiting with bated breath. I would be super surprised if we don’t see > performance impact. Yeah, in A/B test the result seems neutral. And I think it can be neutral since this change does not add additional load / store (isStatic()'s flag resides in ref count number itself). But... I'm not sure, and watching the bots. If we can keep this change, we have a chance to put fully-static-atomic-string-hash-table in front of runtime atomic string table.
Yusuke Suzuki
Comment 11 2019-03-12 13:58:52 PDT
It seems that this is perf-neutral in iOS, however, it is a bit hard to check the performance difference right now since r242714 causes large difference, and this patch is involved in the patch set including r242714. I think, 1. Once rolling out this patch 2. See the performance difference 3. After r242714's related changes are landed, let's land it again and see performance difference is better.
WebKit Commit Bot
Comment 12 2019-03-12 14:00:06 PDT
Re-opened since this is blocked by bug 195641
Yusuke Suzuki
Comment 13 2019-03-15 11:23:54 PDT
Maybe, it is a good timing to land it again to see the performance effect!
Simon Fraser (smfr)
Comment 14 2019-03-15 14:29:14 PDT
This seemed to increase binary size quite significantly (and it goes down on the rollout).
Yusuke Suzuki
Comment 15 2019-03-15 14:58:40 PDT
(In reply to Simon Fraser (smfr) from comment #14) > This seemed to increase binary size quite significantly (and it goes down on > the rollout). Yes, this is because StringImpl::{ref,deref} code increases. (ReadOnly memory) But if we can avoid all heap allocations for AtomicStringImpls (and other types of WTFString backed by StaticStringImpl) finally, I think we can get net win in dirty memory. (Still, StaticStringImpl includes pointer, so it can be seen as a dirty __DATA memory. But if it is in a shared cache, then it can be a complete ReadOnly memory).
Note You need to log in before you can comment on or make changes to this bug.