Hi Team, While going through Blink's commit, I came across another potential optimization for discussion similar to Bug 249217. The intention is to discuss whether it is good for Webkit or not, hence I am raising this bug. Blink Commit - https://chromium.googlesource.com/chromium/blink/+/21bcec8c5b672380105b539d6da45be0f19a4c4c Webkit GitHub Source - https://github.com/WebKit/WebKit/blob/23a93ba0cddf949d000cadd4198f5f874178a614/Source/WebCore/css/StyleProperties.cpp#LL1784 Benchmark - CSSPropertySetterGetterMethods.html - JSFiddle - https://jsfiddle.net/gb21f0q5/ *** Safari 16.1 *** Time: values 17666.24843161856, 17755.359394703646, 17644.11027568922, 17600, 17600.000000000022, 17710.69182389935, 17800.252844500592, 17755.359394703617, 17777.777777777756, 17732.997481108352, 17868.02030456861, 17732.997481108272, 17822.784810126625, 17755.359394703617, 17913.48600508906, 17845.37389100135, 17868.020304568487, 17710.69182389933, 17276.0736196319, 17688.442211055277 runs/s avg 17726.202363487682 runs/s median 17744.178437905983 runs/s stdev 136.94536169704648 runs/s min 17276.0736196319 runs/s max 17913.48600508906 runs/s *** Chrome Canary 110 *** Time: values 15440.289504318078, 15579.357352187391, 15440.289505428227, 15298.804780876493, 15359.999997558594, 15577.461361949843, 15636.452480526757, 15674.748955208695, 15625.00000250111, 15602.145295431477, 15626.907581037023, 15579.357351057155, 15668.992533203058, 15298.195292332033, 15668.99253205978, 15886.806503896469, 15847.468118415667, 15788.824475231766, 15726.747755867036, 15892.724112712829 runs/s avg 15610.978274589976 runs/s median 15625.953791769067 runs/s stdev 175.92830129184418 runs/s min 15298.195292332033 runs/s max 15892.724112712829 runs/s *** Firefox Nightly 110 *** Time: values 11200, 11341.772151898735, 11356.147021546261, 11385.006353240153, 11428.57142857143, 11399.491094147583, 10961.791831357048, 11063.829787234043, 11019.867549668874, 10961.791831357048, 11313.131313131313, 11356.147021546261, 11327.433628318584, 11356.147021546261, 11341.772151898735, 10918.635170603675, 10791.18028534371, 11116.625310173697, 10990.752972258917, 10847.457627118643 runs/s avg 11173.87757754805 runs/s median 11256.565656565657 runs/s stdev 210.36328367365292 runs/s min 10791.18028534371 runs/s max 11428.57142857143 runs/s *** Safari Technology Preview 159 *** (Regressed here) Time: values 16326.530612244898, 15258.278145695373, 15118.110236220491, 15590.742996345936, 16326.530612244878, 16797.90026246721, 16775.884665792964, 16842.105263157795, 16908.85072655218, 16931.21693121697, 16864.295125164732, 17021.27659574468, 16886.54353562001, 16864.295125164692, 16886.54353562001, 16347.381864623281, 16864.295125164608, 16666.666666666708, 16601.815823605786, 16886.543535620054 runs/s avg 16538.290369246664 runs/s median 16820.002762812503 runs/s stdev 567.7122709497032 runs/s min 15118.110236220491 runs/s max 17021.27659574468 runs/s ________ Benchmark - CSSPropertyUpdateValue.html - JSFiddle - https://jsfiddle.net/knhdrb8q/ *** Safari 16.1 *** Time: values 44688.27930174562, 44744.069912609266, 44912.28070175434, 44856.07008760946, 44688.279301745584, 44856.07008760941, 44912.28070175439, 44856.070087609565, 44632.62764632638, 44688.27930174533, 44856.07008760972, 44373.33333333323, 43617.30013106139, 44411.40024783138, 43674.5406824146, 44968.63237139272, 44196.54714475432, 44373.333333333336, 44968.632371392516, 45025.1256281405 runs/s avg 44614.961123088644 runs/s median 44716.17460717744 runs/s stdev 402.21981397440857 runs/s min 43617.30013106139 runs/s max 45025.1256281405 runs/s *** Chrome Canary 110 *** Time: values 32623.932716112457, 32795.285674178005, 32892.20095028639, 32964.202932332286, 33212.247015573535, 33126.29399534822, 32096.288865640377, 32205.308847260563, 32632.249840662844, 32603.158431467982, 33092.03722752201, 33122.00802531235, 33199.32563767146, 33104.87520962804, 32520.32520128215, 33220.8668585363, 32883.75080534364, 33324.655033096395, 33433.459582592855, 33342.016152109754 runs/s avg 32919.72445009788 runs/s median 33028.12007992715 runs/s stdev 373.1824021557593 runs/s min 32096.288865640377 runs/s max 33433.459582592855 runs/s *** Firefox Nightly 110 *** Time: values 24489.79591836735, 24935.064935064936, 24303.79746835443, 24870.466321243523, 25098.039215686276, 25296.442687747036, 25163.826998689383, 25065.27415143603, 25065.27415143603, 25296.442687747036, 25098.039215686276, 25130.890052356022, 24902.72373540856, 25000, 25000, 24967.49024707412, 25032.594524119948, 25163.826998689383, 25098.039215686276, 24967.49024707412 runs/s avg 24997.27593859334 runs/s median 25048.934337777988 runs/s stdev 236.46697146253058 runs/s min 24303.79746835443 runs/s max 25296.442687747036 runs/s *** Safari Technology Preview 159 *** Time: values 42886.59793814433, 42831.40283140283, 42666.66666666652, 42448.97959183666, 42612.03585147247, 42666.666666666664, 42448.979591836636, 42612.03585147247, 42612.035851472574, 42721.4377406929, 42941.93548387097, 42776.349614395884, 42941.93548387097, 42886.59793814433, 42997.41602067203, 42503.192848020335, 42448.97959183683, 42721.437740693, 42503.19284802053, 42666.66666666627 runs/s avg 42694.72714089276 runs/s median 42666.66666666659 runs/s stdev 176.46600106525014 runs/s min 42448.979591836636 runs/s max 42997.41602067203 runs/s _______ We are already fastest but if we can make it faster with this patch then why not? Just wanted to raise it for discussion. Thanks!
<rdar://problem/103558184>