We have a large number of WKPreference switches that exist for rare debugging or experimentation purposes, or for specific test operations. We should hint to the compiler when we know what the likely answer is, so that normal page loading is as efficient as possible.
Created attachment 458975 [details] Patch
This patch will be used to do some A/B performance testing to see if it is worth doing.
Comment on attachment 458975 [details] Patch If we change the default value of a setting, is there a script we can run that updates all the LIKELY/UNLIKELY ?
(In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 458975 [details] > Patch > > If we change the default value of a setting, is there a script we can run > that updates all the LIKELY/UNLIKELY ? Not today, but we SHOULD. I did a pass where I took all the "default true" features, or the "default false" weird debuggy features, and purposefully did not touch things that were a mix (depending on platform), or were in active development and would presumably become on by default in the future. I'm mostly curious if hinting like this will have any benefit. If it does, it would be more ammunition to remove feature flags whenever possible to improve performance.
If we had metadata which bug 222885 suggests, could we not autogenerate this in the getters? Both clang and gcc should be able to propagate the hint from the return value, which also avoids the problems with updating everything.
<rdar://problem/93268359>