RESOLVED FIXED Bug 106202
DFG should constant fold GetScope, and accesses to the scope register in the ByteCodeParser should not pretend that it's a constant as that breaks OSR exit liveness tracking
https://bugs.webkit.org/show_bug.cgi?id=106202
Summary DFG should constant fold GetScope, and accesses to the scope register in the ...
Filip Pizlo
Reported 2013-01-06 18:07:21 PST
If we know that the JSFunction operand is a constant, then we could turn GetScope into a constant as well.
Attachments
the basic idea (30.23 KB, patch)
2015-03-03 16:45 PST, Filip Pizlo
no flags
the patch (35.07 KB, patch)
2015-03-03 19:19 PST, Filip Pizlo
benjamin: review+
Filip Pizlo
Comment 1 2015-03-03 16:45:29 PST
Created attachment 247814 [details] the basic idea This will require a lot of testing.
Filip Pizlo
Comment 2 2015-03-03 19:19:44 PST
Created attachment 247826 [details] the patch
Filip Pizlo
Comment 3 2015-03-03 19:30:42 PST
Benchmark report for SunSpider, LongSpider, V8Spider, Octane, Kraken, JSRegress, AsmBench, and CompressionBench on dethklok (MacBookPro9,1). VMs tested: "TipOfTree" at /Volumes/Data/pizlo/quartary/OpenSource/WebKitBuild/Release/jsc (r180964) "FixScopeWatch" at /Volumes/Data/pizlo/tertiary/OpenSource/WebKitBuild/Release/jsc (r180964) Collected 6 samples per benchmark/VM, with 6 VM invocations per benchmark. Emitted a call to gc() between sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used the jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark execution times with 95% confidence intervals in milliseconds. TipOfTree FixScopeWatch SunSpider: 3d-cube 4.8818+-0.0648 ? 5.0219+-0.4331 ? might be 1.0287x slower 3d-morph 6.0559+-0.1039 ? 6.1942+-0.2190 ? might be 1.0228x slower 3d-raytrace 6.6930+-0.6535 6.3181+-0.1064 might be 1.0593x faster access-binary-trees 1.9760+-0.0167 1.9712+-0.0184 access-fannkuch 5.9154+-0.1496 ? 5.9910+-0.3628 ? might be 1.0128x slower access-nbody 2.8868+-0.0662 ? 2.9536+-0.2406 ? might be 1.0232x slower access-nsieve 3.6418+-0.1828 3.5806+-0.0663 might be 1.0171x faster bitops-3bit-bits-in-byte 1.5943+-0.0775 1.5447+-0.0171 might be 1.0321x faster bitops-bits-in-byte 3.5695+-0.0702 3.5365+-0.0352 bitops-bitwise-and 2.1845+-0.1878 2.1298+-0.0427 might be 1.0257x faster bitops-nsieve-bits 3.7052+-0.0578 3.6862+-0.0347 controlflow-recursive 2.3047+-0.1799 2.2660+-0.1643 might be 1.0171x faster crypto-aes 4.3910+-0.4677 4.2024+-0.1471 might be 1.0449x faster crypto-md5 2.5719+-0.1345 2.4967+-0.0491 might be 1.0301x faster crypto-sha1 2.8722+-0.2743 2.7679+-0.4077 might be 1.0377x faster date-format-tofte 9.5362+-0.2367 9.4816+-0.1821 date-format-xparb 5.1246+-0.1100 ? 5.2005+-0.0930 ? might be 1.0148x slower math-cordic 3.1307+-0.1317 3.0744+-0.1068 might be 1.0183x faster math-partial-sums 5.2037+-0.1117 5.1359+-0.1071 might be 1.0132x faster math-spectral-norm 1.9014+-0.0328 1.8841+-0.0550 regexp-dna 7.9770+-1.2647 ? 8.2120+-1.4100 ? might be 1.0295x slower string-base64 4.3436+-0.0824 ? 4.3465+-0.1579 ? string-fasta 6.8934+-0.6654 6.6233+-0.1021 might be 1.0408x faster string-tagcloud 10.0256+-0.1550 9.9666+-0.3847 string-unpack-code 20.5290+-0.3683 20.3044+-0.8957 might be 1.0111x faster string-validate-input 4.7103+-0.0800 4.6520+-0.0780 might be 1.0125x faster <arithmetic> * 5.1777+-0.1165 5.1362+-0.0782 might be 1.0081x faster <geometric> 4.2941+-0.0772 4.2513+-0.0501 might be 1.0101x faster <harmonic> 3.6815+-0.0618 3.6348+-0.0281 might be 1.0129x faster TipOfTree FixScopeWatch LongSpider: 3d-cube 1100.6284+-15.7735 1095.5994+-6.6646 3d-morph 1558.2181+-22.9648 1549.0689+-12.1008 3d-raytrace 744.3870+-10.8926 729.1478+-9.6368 might be 1.0209x faster access-binary-trees 986.5206+-4.4922 ? 989.1923+-10.3722 ? access-fannkuch 330.4147+-12.9497 ? 337.4410+-14.4272 ? might be 1.0213x slower access-nbody 618.8371+-4.2948 ? 625.5186+-9.0834 ? might be 1.0108x slower access-nsieve 941.5618+-8.4859 ! 971.8967+-14.5108 ! definitely 1.0322x slower bitops-3bit-bits-in-byte 45.7198+-2.0410 45.5826+-2.1404 bitops-bits-in-byte 105.4943+-3.3351 104.7314+-2.4370 bitops-nsieve-bits 695.3454+-6.1057 ? 703.6340+-9.5449 ? might be 1.0119x slower controlflow-recursive 502.1332+-5.5546 ? 506.9505+-5.2676 ? crypto-aes 716.1024+-3.3483 715.7314+-8.6985 crypto-md5 620.7645+-6.9020 615.4005+-8.5855 crypto-sha1 653.1191+-6.8585 653.0269+-9.2926 date-format-tofte 808.8141+-15.8915 794.0575+-21.4639 might be 1.0186x faster date-format-xparb 753.3946+-11.0760 ? 774.3418+-21.5291 ? might be 1.0278x slower math-cordic 595.5793+-7.1088 ? 596.1919+-7.4955 ? math-partial-sums 513.2996+-7.3164 ? 514.2115+-6.8522 ? math-spectral-norm 571.1936+-8.9008 ? 573.1126+-3.2463 ? string-base64 363.0661+-8.1732 362.5895+-8.8489 string-fasta 441.4485+-5.9410 ? 445.4162+-10.8534 ? string-tagcloud 225.4155+-1.8776 ^ 218.0723+-2.2954 ^ definitely 1.0337x faster <arithmetic> 631.4299+-1.2320 ? 632.7689+-1.3563 ? might be 1.0021x slower <geometric> * 514.8797+-2.1591 ? 515.4841+-1.6397 ? might be 1.0012x slower <harmonic> 331.5053+-5.0703 330.7837+-5.3529 might be 1.0022x faster TipOfTree FixScopeWatch V8Spider: crypto 55.7063+-1.8521 55.6180+-1.6411 deltablue 86.3322+-3.9432 ? 90.7857+-7.0118 ? might be 1.0516x slower earley-boyer 43.3649+-1.5815 42.3847+-0.6693 might be 1.0231x faster raytrace 39.6401+-1.3013 ? 39.8878+-1.1962 ? regexp 69.1650+-1.6454 69.1000+-2.3284 richards 78.0308+-2.9192 ? 78.4458+-2.3281 ? splay 37.0502+-2.2428 35.4827+-1.5673 might be 1.0442x faster <arithmetic> 58.4699+-0.8519 ? 58.8150+-0.8004 ? might be 1.0059x slower <geometric> * 55.6219+-0.8734 55.5636+-0.6198 might be 1.0010x faster <harmonic> 52.9391+-0.9549 52.5551+-0.5870 might be 1.0073x faster TipOfTree FixScopeWatch Octane: encrypt 0.20522+-0.00430 0.20308+-0.00138 might be 1.0106x faster decrypt 3.62736+-0.02218 ? 3.64513+-0.06049 ? deltablue x2 0.20812+-0.00226 0.20695+-0.00296 earley 0.68911+-0.00890 0.68154+-0.00959 might be 1.0111x faster boyer 5.83184+-0.02611 ? 5.84028+-0.04294 ? navier-stokes x2 5.25105+-0.06272 ? 5.28606+-0.03827 ? raytrace x2 1.29463+-0.03771 ? 1.31356+-0.03923 ? might be 1.0146x slower richards x2 0.12509+-0.00068 0.12391+-0.00108 splay x2 0.37731+-0.00378 0.37235+-0.00480 might be 1.0133x faster regexp x2 33.22525+-0.36126 ? 33.36372+-0.17874 ? pdfjs x2 51.69228+-0.39503 51.32574+-0.25539 mandreel x2 51.00733+-0.75990 50.51836+-0.24494 gbemu x2 44.45000+-0.20517 ? 44.98643+-2.07512 ? might be 1.0121x slower closure 0.56950+-0.00581 ^ 0.55731+-0.00302 ^ definitely 1.0219x faster jquery 7.24390+-0.05847 7.13562+-0.06815 might be 1.0152x faster box2d x2 13.02334+-0.06835 12.89889+-0.10292 zlib x2 395.68880+-13.96756 ? 396.89996+-1.81329 ? typescript x2 849.44714+-7.77155 ? 855.51298+-14.29822 ? <arithmetic> 96.99159+-0.93940 ? 97.45603+-0.98901 ? might be 1.0048x slower <geometric> * 6.91976+-0.01672 6.90439+-0.03318 might be 1.0022x faster <harmonic> 0.71706+-0.00409 0.71092+-0.00312 might be 1.0086x faster TipOfTree FixScopeWatch Kraken: ai-astar 268.412+-5.060 267.039+-3.313 audio-beat-detection 111.641+-0.899 111.256+-0.854 audio-dft 160.957+-5.775 156.736+-1.528 might be 1.0269x faster audio-fft 79.765+-4.078 ! 84.882+-0.234 ! definitely 1.0642x slower audio-oscillator 239.163+-5.888 237.089+-2.193 imaging-darkroom 130.609+-4.452 ? 134.976+-1.635 ? might be 1.0334x slower imaging-desaturate 62.998+-1.376 ? 63.021+-0.930 ? imaging-gaussian-blur 115.971+-2.896 114.727+-2.699 might be 1.0108x faster json-parse-financial 48.091+-1.307 45.870+-1.989 might be 1.0484x faster json-stringify-tinderbox 59.513+-3.635 57.049+-2.132 might be 1.0432x faster stanford-crypto-aes 60.150+-2.399 59.947+-2.870 stanford-crypto-ccm 50.705+-2.094 48.910+-1.483 might be 1.0367x faster stanford-crypto-pbkdf2 169.464+-2.168 167.272+-3.358 might be 1.0131x faster stanford-crypto-sha256-iterative 55.330+-2.213 54.985+-1.799 <arithmetic> * 115.198+-0.678 114.554+-0.377 might be 1.0056x faster <geometric> 97.624+-0.359 ^ 96.897+-0.313 ^ definitely 1.0075x faster <harmonic> 84.413+-0.679 83.413+-0.380 might be 1.0120x faster TipOfTree FixScopeWatch JSRegress: abs-boolean 2.6487+-0.0813 2.6250+-0.0317 adapt-to-double-divide 17.1166+-0.6436 16.9493+-0.3536 aliased-arguments-getbyval 0.8510+-0.1043 ? 0.8964+-0.1686 ? might be 1.0533x slower allocate-big-object 2.2979+-0.0317 ? 2.3337+-0.1216 ? might be 1.0156x slower arguments-out-of-bounds 18.4977+-1.4952 17.9851+-1.2759 might be 1.0285x faster arity-mismatch-inlining 0.8437+-0.0593 0.8145+-0.0184 might be 1.0359x faster array-access-polymorphic-structure 6.4804+-0.1407 ? 6.8251+-0.5844 ? might be 1.0532x slower array-nonarray-polymorhpic-access 36.3266+-1.2128 35.7397+-2.3332 might be 1.0164x faster array-prototype-every 90.4097+-2.4881 ? 91.1521+-3.5069 ? array-prototype-forEach 89.5922+-1.9220 ? 91.7344+-1.6994 ? might be 1.0239x slower array-prototype-map 107.7304+-1.9639 ? 112.3070+-4.5522 ? might be 1.0425x slower array-prototype-some 90.1558+-3.4172 ? 91.1971+-4.0743 ? might be 1.0116x slower array-splice-contiguous 42.3068+-1.7470 42.0109+-1.8544 array-with-double-add 4.2355+-0.2623 4.0736+-0.0394 might be 1.0397x faster array-with-double-increment 3.2598+-0.2360 3.2395+-0.0464 array-with-double-mul-add 5.0776+-0.1026 ? 5.1941+-0.1437 ? might be 1.0229x slower array-with-double-sum 3.2948+-0.1218 3.2820+-0.1562 array-with-int32-add-sub 6.7727+-0.0153 ^ 6.6862+-0.0364 ^ definitely 1.0130x faster array-with-int32-or-double-sum 3.3317+-0.0650 3.3071+-0.0241 ArrayBuffer-DataView-alloc-large-long-lived 36.5284+-1.7122 35.3626+-1.3884 might be 1.0330x faster ArrayBuffer-DataView-alloc-long-lived 16.6987+-1.7038 14.2071+-1.2730 might be 1.1754x faster ArrayBuffer-Int32Array-byteOffset 3.5568+-0.0852 3.5273+-0.1329 ArrayBuffer-Int8Array-alloc-large-long-lived 34.8643+-1.6115 ? 35.2524+-2.3943 ? might be 1.0111x slower ArrayBuffer-Int8Array-alloc-long-lived-buffer 24.7555+-2.8060 22.2649+-1.5528 might be 1.1119x faster ArrayBuffer-Int8Array-alloc-long-lived 15.2381+-0.9736 13.8343+-1.2645 might be 1.1015x faster ArrayBuffer-Int8Array-alloc 13.1582+-1.3380 11.9024+-1.3989 might be 1.1055x faster asmjs_bool_bug 7.7462+-0.2118 ? 7.9991+-0.3645 ? might be 1.0327x slower assign-custom-setter-polymorphic 3.0258+-0.1265 ? 3.1619+-0.0710 ? might be 1.0450x slower assign-custom-setter 4.1283+-0.1147 ! 4.4414+-0.0648 ! definitely 1.0758x slower basic-set 10.5227+-0.5711 ? 10.7120+-0.6091 ? might be 1.0180x slower big-int-mul 3.9867+-0.0461 3.9120+-0.0343 might be 1.0191x faster boolean-test 3.0627+-0.0699 3.0481+-0.0927 branch-fold 3.8466+-0.4396 3.6540+-0.0365 might be 1.0527x faster by-val-generic 7.7045+-0.1103 ? 7.8875+-0.2075 ? might be 1.0237x slower call-spread-apply 13.9705+-0.5725 ? 14.1681+-0.7794 ? might be 1.0141x slower call-spread-call 5.9695+-0.5546 ? 6.1251+-0.8886 ? might be 1.0261x slower captured-assignments 0.4436+-0.0317 0.4423+-0.0172 cast-int-to-double 5.3187+-0.0804 5.2542+-0.0203 might be 1.0123x faster cell-argument 8.8110+-0.4010 8.5900+-0.4174 might be 1.0257x faster cfg-simplify 2.8683+-0.1377 2.7900+-0.0199 might be 1.0281x faster chain-getter-access 10.2814+-0.4951 9.9417+-0.1416 might be 1.0342x faster cmpeq-obj-to-obj-other 11.0201+-0.7532 10.6249+-1.1699 might be 1.0372x faster constant-test 4.9163+-0.1086 4.8894+-0.0376 DataView-custom-properties 42.0777+-1.1860 ^ 38.8163+-1.1218 ^ definitely 1.0840x faster delay-tear-off-arguments-strictmode 23.0496+-2.3461 ? 23.4046+-1.7486 ? might be 1.0154x slower deltablue-varargs 182.6706+-3.0160 ? 183.7074+-1.9689 ? destructuring-arguments 5.2561+-0.1239 5.2060+-0.0516 destructuring-swap 5.0702+-0.0597 4.9886+-0.0360 might be 1.0164x faster direct-arguments-getbyval 0.9124+-0.0694 0.8957+-0.0448 might be 1.0187x faster div-boolean-double 5.2573+-0.1247 5.1829+-0.0049 might be 1.0144x faster div-boolean 7.8658+-0.2272 7.7560+-0.0276 might be 1.0142x faster double-get-by-val-out-of-bounds 4.3036+-0.0737 ? 4.3733+-0.2728 ? might be 1.0162x slower double-pollution-getbyval 8.8908+-0.1497 8.8180+-0.0898 double-pollution-putbyoffset 4.1417+-0.2944 ? 4.1645+-0.2537 ? double-to-int32-typed-array-no-inline 2.2939+-0.2062 ? 2.2981+-0.2134 ? double-to-int32-typed-array 2.0423+-0.0921 2.0000+-0.0858 might be 1.0211x faster double-to-uint32-typed-array-no-inline 2.3408+-0.0412 2.3049+-0.1097 might be 1.0156x faster double-to-uint32-typed-array 2.0878+-0.1099 2.0750+-0.1138 elidable-new-object-dag 43.2961+-2.3774 ? 44.2493+-2.6152 ? might be 1.0220x slower elidable-new-object-roflcopter 49.2076+-1.4465 48.9808+-1.5034 elidable-new-object-then-call 39.7385+-2.3194 38.4414+-1.1547 might be 1.0337x faster elidable-new-object-tree 45.6972+-2.7990 44.7347+-1.2973 might be 1.0215x faster empty-string-plus-int 5.6546+-0.7518 5.2321+-0.0527 might be 1.0808x faster emscripten-cube2hash 40.0480+-1.2478 ? 40.6900+-2.4296 ? might be 1.0160x slower exit-length-on-plain-object 15.3117+-2.2505 13.7933+-0.6483 might be 1.1101x faster external-arguments-getbyval 1.2768+-0.0339 ? 1.3869+-0.1880 ? might be 1.0862x slower external-arguments-putbyval 2.1805+-0.1790 ? 2.2715+-0.4608 ? might be 1.0417x slower fixed-typed-array-storage-var-index 1.2017+-0.0102 ? 1.2058+-0.0315 ? fixed-typed-array-storage 0.9497+-0.1214 0.8747+-0.0213 might be 1.0857x faster Float32Array-matrix-mult 4.3309+-0.1464 ? 4.5851+-0.8047 ? might be 1.0587x slower Float32Array-to-Float64Array-set 54.4957+-4.9925 ? 58.2524+-3.1760 ? might be 1.0689x slower Float64Array-alloc-long-lived 66.7236+-1.1267 ? 67.6910+-2.6008 ? might be 1.0145x slower Float64Array-to-Int16Array-set 68.6000+-1.7176 66.9167+-1.5746 might be 1.0252x faster fold-double-to-int 15.9098+-1.5063 15.1627+-0.3982 might be 1.0493x faster fold-get-by-id-to-multi-get-by-offset-rare-int 10.0523+-0.9491 9.9700+-1.2080 fold-get-by-id-to-multi-get-by-offset 9.6719+-0.5478 9.6540+-0.9121 fold-multi-get-by-offset-to-get-by-offset 8.5170+-0.2362 8.1814+-0.6432 might be 1.0410x faster fold-multi-get-by-offset-to-poly-get-by-offset 8.6396+-0.9415 ? 8.9288+-0.6581 ? might be 1.0335x slower fold-multi-put-by-offset-to-poly-put-by-offset 8.3433+-1.5916 ? 8.7255+-0.8909 ? might be 1.0458x slower fold-multi-put-by-offset-to-put-by-offset 5.1364+-0.7523 4.8988+-0.6234 might be 1.0485x faster fold-multi-put-by-offset-to-replace-or-transition-put-by-offset 9.7964+-1.1807 8.9507+-0.6694 might be 1.0945x faster fold-put-by-id-to-multi-put-by-offset 9.7359+-0.7960 ? 10.1344+-1.3762 ? might be 1.0409x slower fold-put-structure 4.9878+-1.0411 4.9823+-1.3966 for-of-iterate-array-entries 5.6586+-0.0823 ? 6.1174+-1.0127 ? might be 1.0811x slower for-of-iterate-array-keys 2.7791+-0.1589 ? 2.8326+-0.1387 ? might be 1.0193x slower for-of-iterate-array-values 2.5576+-0.1051 ? 2.6866+-0.4918 ? might be 1.0504x slower fround 20.3826+-0.5859 ? 20.8285+-1.7940 ? might be 1.0219x slower ftl-library-inlining-dataview 83.8385+-2.4468 ? 84.0439+-2.4079 ? ftl-library-inlining 67.9330+-2.1387 ? 71.1065+-10.2351 ? might be 1.0467x slower function-dot-apply 1.5966+-0.1493 1.4825+-0.0529 might be 1.0769x faster function-test 3.3384+-0.0432 ? 3.3416+-0.0494 ? function-with-eval 128.4874+-4.5722 125.7065+-3.3695 might be 1.0221x faster gcse-poly-get-less-obvious 19.3588+-1.0973 ? 19.5163+-1.0112 ? gcse-poly-get 20.4125+-1.2814 ? 22.7005+-3.5323 ? might be 1.1121x slower gcse 4.3962+-0.2208 4.3024+-0.0502 might be 1.0218x faster get-by-id-bimorphic-check-structure-elimination-simple 2.7579+-0.0964 2.7236+-0.0811 might be 1.0126x faster get-by-id-bimorphic-check-structure-elimination 6.0708+-0.0472 6.0579+-0.2007 get-by-id-chain-from-try-block 9.0181+-1.6393 7.8025+-0.1411 might be 1.1558x faster get-by-id-check-structure-elimination 5.1684+-0.2421 5.0940+-0.0752 might be 1.0146x faster get-by-id-proto-or-self 17.4556+-0.6086 ? 18.4931+-1.2940 ? might be 1.0594x slower get-by-id-quadmorphic-check-structure-elimination-simple 2.8646+-0.0241 ? 2.9451+-0.0673 ? might be 1.0281x slower get-by-id-self-or-proto 18.7268+-0.7321 ? 18.7407+-1.3908 ? get-by-val-out-of-bounds 4.2526+-0.0216 ! 4.3596+-0.0493 ! definitely 1.0252x slower get_callee_monomorphic 3.9534+-0.2213 ? 3.9558+-0.2310 ? get_callee_polymorphic 3.5378+-0.3109 3.4897+-0.1491 might be 1.0138x faster getter-no-activation 5.0227+-1.3911 4.9282+-0.6288 might be 1.0192x faster getter-richards 132.1864+-4.2405 127.9328+-5.8186 might be 1.0332x faster getter 5.1398+-0.0679 5.0656+-0.0499 might be 1.0147x faster global-var-const-infer-fire-from-opt 0.8646+-0.0343 ? 0.9258+-0.0735 ? might be 1.0708x slower global-var-const-infer 0.9485+-0.0511 0.8875+-0.2322 might be 1.0687x faster HashMap-put-get-iterate-keys 27.7736+-0.4529 27.5104+-0.8592 HashMap-put-get-iterate 27.4629+-0.4726 27.1496+-0.8510 might be 1.0115x faster HashMap-string-put-get-iterate 27.3636+-1.1479 ? 28.7497+-1.3888 ? might be 1.0507x slower hoist-make-rope 11.5487+-1.0880 ? 12.3691+-1.5094 ? might be 1.0710x slower hoist-poly-check-structure-effectful-loop 4.9853+-0.1862 ? 5.0438+-0.3217 ? might be 1.0117x slower hoist-poly-check-structure 3.6707+-0.1249 3.6160+-0.0590 might be 1.0151x faster imul-double-only 8.3403+-0.4227 8.2857+-0.0993 imul-int-only 10.4554+-1.0142 9.8590+-0.0899 might be 1.0605x faster imul-mixed 8.6490+-0.4996 8.2548+-0.6066 might be 1.0477x faster in-four-cases 18.8822+-0.3020 ? 18.9926+-0.2289 ? in-one-case-false 10.2473+-0.4483 ? 10.3069+-0.6321 ? in-one-case-true 10.0060+-0.3482 ? 10.2429+-0.4642 ? might be 1.0237x slower in-two-cases 10.7238+-0.5146 ^ 10.1020+-0.0939 ^ definitely 1.0616x faster indexed-properties-in-objects 2.8907+-0.0429 2.8335+-0.1029 might be 1.0202x faster infer-closure-const-then-mov-no-inline 3.6884+-0.0529 ? 3.7279+-0.1187 ? might be 1.0107x slower infer-closure-const-then-mov 19.7770+-1.4909 19.4694+-1.8833 might be 1.0158x faster infer-closure-const-then-put-to-scope-no-inline 11.7218+-0.2726 ? 11.7241+-0.2206 ? infer-closure-const-then-put-to-scope 20.6169+-1.4604 ? 22.1382+-0.6520 ? might be 1.0738x slower infer-closure-const-then-reenter-no-inline 51.3099+-2.8822 ? 52.2773+-2.0394 ? might be 1.0189x slower infer-closure-const-then-reenter 18.8804+-1.0082 ! 23.3024+-1.1287 ! definitely 1.2342x slower infer-constant-global-property 30.9268+-1.5617 30.8008+-1.6095 infer-constant-property 2.6828+-0.1077 ? 2.6971+-0.1172 ? infer-one-time-closure-ten-vars 12.4943+-0.4993 ? 12.8271+-0.8578 ? might be 1.0266x slower infer-one-time-closure-two-vars 11.8252+-0.0718 ? 11.8927+-0.2508 ? infer-one-time-closure 12.2103+-0.7604 ? 12.5166+-1.2734 ? might be 1.0251x slower infer-one-time-deep-closure 21.4027+-1.3720 ? 21.7456+-1.4904 ? might be 1.0160x slower inline-arguments-access 1.4251+-0.0326 1.4049+-0.0227 might be 1.0143x faster inline-arguments-aliased-access 1.6705+-0.0152 ? 1.6715+-0.0514 ? inline-arguments-local-escape 13.6145+-1.3604 13.4452+-1.4949 might be 1.0126x faster inline-get-scoped-var 4.2216+-0.1322 ! 4.5600+-0.0653 ! definitely 1.0802x slower inlined-put-by-id-transition 9.6582+-0.1607 ? 9.7417+-0.3075 ? int-or-other-abs-then-get-by-val 4.9132+-0.0235 ? 4.9365+-0.0604 ? int-or-other-abs-zero-then-get-by-val 16.9377+-0.8799 ? 18.5035+-1.1289 ? might be 1.0924x slower int-or-other-add-then-get-by-val 4.3253+-0.1960 4.2301+-0.0338 might be 1.0225x faster int-or-other-add 5.2714+-0.0327 ? 5.3017+-0.1526 ? int-or-other-div-then-get-by-val 4.1906+-0.0294 ? 4.2958+-0.1918 ? might be 1.0251x slower int-or-other-max-then-get-by-val 4.2965+-0.0436 ? 4.3072+-0.0472 ? int-or-other-min-then-get-by-val 4.4329+-0.0982 4.3972+-0.1396 int-or-other-mod-then-get-by-val 3.8856+-0.0871 3.8807+-0.0582 int-or-other-mul-then-get-by-val 3.9961+-0.0902 ? 4.0183+-0.1097 ? int-or-other-neg-then-get-by-val 4.6194+-0.0881 4.5472+-0.0139 might be 1.0159x faster int-or-other-neg-zero-then-get-by-val 17.3876+-1.3085 17.2575+-0.6636 int-or-other-sub-then-get-by-val 4.2925+-0.0347 ? 4.3085+-0.0460 ? int-or-other-sub 3.6018+-0.1280 3.4957+-0.0526 might be 1.0303x faster int-overflow-local 4.2941+-0.0789 ? 4.3354+-0.0246 ? Int16Array-alloc-long-lived 49.4705+-3.0822 48.0822+-1.4054 might be 1.0289x faster Int16Array-bubble-sort-with-byteLength 21.1527+-0.5512 ? 23.2466+-3.2154 ? might be 1.0990x slower Int16Array-bubble-sort 25.2425+-2.1376 23.9976+-2.5006 might be 1.0519x faster Int16Array-load-int-mul 1.5856+-0.1798 1.5288+-0.1779 might be 1.0371x faster Int16Array-to-Int32Array-set 53.1141+-5.6434 ? 53.1622+-4.4053 ? Int32Array-alloc-large 24.4822+-1.1562 24.1956+-0.6273 might be 1.0118x faster Int32Array-alloc-long-lived 54.4914+-1.8157 ? 54.6369+-2.0889 ? Int32Array-alloc 3.2544+-0.4778 ? 3.3197+-0.4899 ? might be 1.0201x slower Int32Array-Int8Array-view-alloc 7.9723+-1.3835 7.8086+-1.6217 might be 1.0210x faster int52-spill 6.5472+-0.1747 ? 6.5980+-0.2479 ? Int8Array-alloc-long-lived 45.8716+-1.0171 45.0514+-1.4730 might be 1.0182x faster Int8Array-load-with-byteLength 3.3686+-0.1360 3.3311+-0.0745 might be 1.0113x faster Int8Array-load 3.3000+-0.0299 ? 3.4148+-0.2501 ? might be 1.0348x slower integer-divide 11.2163+-0.3019 11.1563+-0.2877 integer-modulo 2.0441+-0.1315 1.9688+-0.0779 might be 1.0383x faster large-int-captured 6.7282+-0.1464 ? 7.0793+-1.1061 ? might be 1.0522x slower large-int-neg 17.1100+-1.3775 16.9482+-1.2018 large-int 15.3799+-1.3693 ? 15.8046+-1.3513 ? might be 1.0276x slower logical-not 4.5812+-0.1192 4.5141+-0.0684 might be 1.0149x faster lots-of-fields 12.6919+-0.6832 ? 13.0502+-0.4364 ? might be 1.0282x slower make-indexed-storage 2.9485+-0.0526 2.8962+-0.1998 might be 1.0181x faster make-rope-cse 4.2493+-0.3805 ? 4.4280+-0.5224 ? might be 1.0420x slower marsaglia-larger-ints 37.0515+-1.9599 36.5626+-1.4979 might be 1.0134x faster marsaglia-osr-entry 24.1124+-1.6696 23.4042+-1.1463 might be 1.0303x faster max-boolean 2.4350+-0.0299 ? 2.4587+-0.0245 ? method-on-number 18.6000+-0.6293 17.5892+-1.0265 might be 1.0575x faster min-boolean 2.4480+-0.0345 ? 2.4501+-0.0238 ? minus-boolean-double 3.1535+-0.0215 ? 3.4152+-0.3943 ? might be 1.0830x slower minus-boolean 2.3483+-0.0462 ^ 2.2670+-0.0200 ^ definitely 1.0359x faster misc-strict-eq 37.2103+-0.6481 ? 38.4065+-0.7791 ? might be 1.0321x slower mod-boolean-double 10.9682+-0.2090 ? 10.9694+-0.2255 ? mod-boolean 7.9917+-0.2549 7.8161+-0.0273 might be 1.0225x faster mul-boolean-double 3.7066+-0.0633 ? 3.7077+-0.0650 ? mul-boolean 2.8790+-0.0347 ? 2.9493+-0.1634 ? might be 1.0244x slower neg-boolean 3.2208+-0.0265 ? 3.2339+-0.1418 ? negative-zero-divide 0.3291+-0.0098 0.3269+-0.0104 negative-zero-modulo 0.3629+-0.0501 0.3300+-0.0157 might be 1.0998x faster negative-zero-negate 0.3128+-0.0182 0.3101+-0.0046 nested-function-parsing 20.8500+-0.2196 ? 21.0886+-0.8165 ? might be 1.0114x slower new-array-buffer-dead 2.7268+-0.0238 ? 2.7546+-0.0550 ? might be 1.0102x slower new-array-buffer-push 7.1215+-0.2901 7.0613+-0.5591 new-array-dead 12.3449+-0.2106 ? 12.7515+-1.0964 ? might be 1.0329x slower new-array-push 5.4430+-0.3324 ? 5.5147+-0.4097 ? might be 1.0132x slower number-test 3.0253+-0.0621 2.9964+-0.0275 object-closure-call 5.5119+-0.1210 5.4504+-0.0619 might be 1.0113x faster object-test 3.2701+-0.2840 3.1639+-0.2312 might be 1.0336x faster obvious-sink-pathology-taken 146.7008+-2.3642 145.6205+-3.3130 obvious-sink-pathology 139.9385+-2.1581 ? 141.0060+-2.0899 ? obviously-elidable-new-object 34.3156+-0.5987 ? 35.5563+-1.8956 ? might be 1.0362x slower plus-boolean-arith 2.4845+-0.0420 ? 2.4918+-0.0182 ? plus-boolean-double 3.2230+-0.0627 ? 3.2979+-0.2993 ? might be 1.0232x slower plus-boolean 2.4230+-0.1478 ? 2.4491+-0.1882 ? might be 1.0108x slower poly-chain-access-different-prototypes-simple 3.3706+-0.1546 3.2748+-0.0286 might be 1.0293x faster poly-chain-access-different-prototypes 2.7994+-0.0706 ? 3.0865+-0.6138 ? might be 1.1026x slower poly-chain-access-simpler 3.2745+-0.0556 ? 3.2941+-0.0487 ? poly-chain-access 2.9673+-0.6810 2.6779+-0.2305 might be 1.1081x faster poly-stricteq 59.4508+-3.1628 ? 59.8458+-3.0489 ? polymorphic-array-call 1.7893+-0.0838 ? 1.8442+-0.1118 ? might be 1.0307x slower polymorphic-get-by-id 3.0990+-0.0389 ? 3.1760+-0.0857 ? might be 1.0249x slower polymorphic-put-by-id 30.4488+-1.5188 28.9930+-1.9179 might be 1.0502x faster polymorphic-structure 14.9955+-0.1447 ? 15.1687+-0.7919 ? might be 1.0115x slower polyvariant-monomorphic-get-by-id 8.5373+-0.1812 ? 8.7954+-0.4617 ? might be 1.0302x slower proto-getter-access 9.8432+-0.1300 ? 9.9282+-0.1132 ? put-by-id-replace-and-transition 8.5701+-0.3818 8.3542+-0.1956 might be 1.0258x faster put-by-id-slightly-polymorphic 2.8316+-0.0343 ? 2.8347+-0.0338 ? put-by-id 13.3614+-0.7100 12.9407+-0.6769 might be 1.0325x faster put-by-val-direct 0.5614+-0.0229 0.5599+-0.0182 put-by-val-large-index-blank-indexing-type 5.9287+-0.3912 ? 6.0675+-0.6097 ? might be 1.0234x slower put-by-val-machine-int 2.4263+-0.0472 ? 2.4747+-0.1092 ? might be 1.0200x slower rare-osr-exit-on-local 15.5075+-0.8456 14.9412+-0.1920 might be 1.0379x faster register-pressure-from-osr 21.7576+-0.4090 21.5243+-0.3046 might be 1.0108x faster setter 5.2311+-0.0884 ? 5.4144+-0.1498 ? might be 1.0350x slower simple-activation-demo 25.2681+-0.6331 ? 26.8905+-1.7783 ? might be 1.0642x slower simple-getter-access 12.8017+-0.1970 12.7620+-0.7732 simple-poly-call-nested 8.2098+-0.2405 7.9786+-0.2460 might be 1.0290x faster simple-poly-call 1.3556+-0.1334 1.2842+-0.0828 might be 1.0556x faster sin-boolean 22.8663+-1.4847 ? 24.3697+-1.8229 ? might be 1.0657x slower sinkable-new-object-dag 69.1835+-1.6499 ? 69.9971+-3.0611 ? might be 1.0118x slower sinkable-new-object-taken 52.1927+-2.7315 ? 53.8577+-1.1351 ? might be 1.0319x slower sinkable-new-object 38.5998+-1.2861 38.2748+-1.0538 slow-array-profile-convergence 2.9017+-0.4325 2.7742+-0.0516 might be 1.0460x faster slow-convergence 3.3162+-0.1511 3.1982+-0.0946 might be 1.0369x faster sparse-conditional 1.0981+-0.0167 1.0933+-0.0521 splice-to-remove 18.3218+-2.3337 17.1922+-1.7737 might be 1.0657x faster string-char-code-at 16.0196+-0.2208 ? 16.2870+-0.4666 ? might be 1.0167x slower string-concat-object 2.2061+-0.3297 2.1204+-0.1832 might be 1.0404x faster string-concat-pair-object 2.1062+-0.1189 2.0886+-0.1188 string-concat-pair-simple 10.6641+-0.3812 ? 10.9228+-0.9776 ? might be 1.0243x slower string-concat-simple 11.2246+-1.2490 10.8890+-0.6683 might be 1.0308x faster string-cons-repeat 7.7460+-0.8757 7.1683+-0.4689 might be 1.0806x faster string-cons-tower 7.7888+-0.8989 7.6854+-0.7778 might be 1.0134x faster string-equality 17.7032+-0.6453 17.6422+-0.8344 string-get-by-val-big-char 7.1570+-0.1437 7.0146+-0.2631 might be 1.0203x faster string-get-by-val-out-of-bounds-insane 3.9580+-0.1201 3.9516+-0.1440 string-get-by-val-out-of-bounds 5.2054+-0.0327 ? 5.2252+-0.0746 ? string-get-by-val 3.4185+-0.1495 ? 3.4698+-0.1464 ? might be 1.0150x slower string-hash 2.0516+-0.1199 2.0177+-0.0799 might be 1.0168x faster string-long-ident-equality 14.4205+-0.1888 14.3978+-0.3768 string-out-of-bounds 15.2197+-0.7379 15.0188+-0.6588 might be 1.0134x faster string-repeat-arith 32.2249+-1.5952 ? 32.6528+-2.3705 ? might be 1.0133x slower string-sub 67.4901+-1.2528 ^ 62.1280+-1.4815 ^ definitely 1.0863x faster string-test 2.9690+-0.0431 2.9434+-0.0705 string-var-equality 31.4433+-1.9899 29.9235+-0.6591 might be 1.0508x faster structure-hoist-over-transitions 2.4035+-0.0320 ? 2.4058+-0.0363 ? substring-concat-weird 40.1316+-1.3752 ? 40.7996+-1.7261 ? might be 1.0166x slower substring-concat 41.7932+-2.3356 ? 42.1058+-1.0034 ? substring 47.5568+-2.5668 ? 47.8192+-2.8245 ? switch-char-constant 2.7146+-0.0438 ? 2.7434+-0.1115 ? might be 1.0106x slower switch-char 7.4245+-0.6862 7.3234+-1.0336 might be 1.0138x faster switch-constant 9.5985+-0.2074 9.4740+-0.4579 might be 1.0131x faster switch-string-basic-big-var 15.0121+-0.1511 ? 15.0950+-0.5064 ? switch-string-basic-big 14.3547+-1.5301 13.7932+-0.3381 might be 1.0407x faster switch-string-basic-var 15.0741+-1.4342 ? 15.5256+-1.6341 ? might be 1.0299x slower switch-string-basic 13.8524+-1.5005 ? 13.8996+-1.3671 ? switch-string-big-length-tower-var 20.7062+-1.9491 ? 21.4915+-1.8856 ? might be 1.0379x slower switch-string-length-tower-var 16.2952+-1.9500 14.9924+-0.7845 might be 1.0869x faster switch-string-length-tower 13.0844+-1.0293 ? 13.8825+-1.8948 ? might be 1.0610x slower switch-string-short 14.3742+-1.8559 13.9345+-1.6566 might be 1.0316x faster switch 11.9159+-0.7100 ? 11.9211+-0.7334 ? tear-off-arguments-simple 1.8586+-0.0711 1.8547+-0.0481 tear-off-arguments 2.7631+-0.0550 ^ 2.6707+-0.0169 ^ definitely 1.0346x faster temporal-structure 12.4395+-0.4494 ? 12.4846+-0.4091 ? to-int32-boolean 13.6075+-0.0792 ? 13.8922+-0.7283 ? might be 1.0209x slower undefined-property-access 384.9645+-3.7653 ? 388.2348+-5.3169 ? undefined-test 3.0744+-0.0282 3.0430+-0.0418 might be 1.0103x faster unprofiled-licm 23.1536+-0.4872 ? 23.6820+-2.2715 ? might be 1.0228x slower weird-inlining-const-prop 2.1232+-0.1320 ? 2.1650+-0.0933 ? might be 1.0197x slower <arithmetic> 18.0680+-0.0400 ? 18.0838+-0.0708 ? might be 1.0009x slower <geometric> * 8.2389+-0.0182 8.2200+-0.0270 might be 1.0023x faster <harmonic> 4.1054+-0.0231 4.0720+-0.0179 might be 1.0082x faster TipOfTree FixScopeWatch AsmBench: bigfib.cpp 502.1099+-4.5136 500.6292+-4.1497 cray.c 435.5160+-2.9687 435.4919+-4.7503 dry.c 492.4881+-10.1834 ? 493.6556+-6.3062 ? FloatMM.c 738.7523+-11.5013 ? 741.8955+-7.7642 ? gcc-loops.cpp 4576.1697+-748.7347 4289.2809+-18.1577 might be 1.0669x faster n-body.c 1001.8194+-12.0359 ? 1011.4697+-14.8828 ? Quicksort.c 446.2690+-2.8736 445.8959+-9.5492 stepanov_container.cpp 3607.7000+-11.4234 ? 3626.6026+-25.5220 ? Towers.c 266.9207+-2.0538 265.7710+-3.2162 <arithmetic> 1340.8606+-82.6522 1312.2991+-4.3582 might be 1.0218x faster <geometric> * 813.1618+-12.9884 809.2278+-2.7980 might be 1.0049x faster <harmonic> 593.7464+-1.3391 593.1946+-2.2074 might be 1.0009x faster TipOfTree FixScopeWatch CompressionBench: huffman 504.6232+-4.6186 ^ 485.0496+-13.0504 ^ definitely 1.0404x faster arithmetic-simple 419.7004+-3.0163 414.8155+-5.2493 might be 1.0118x faster arithmetic-precise 318.6183+-2.2796 316.4543+-3.4958 arithmetic-complex-precise 318.3165+-5.0031 315.7588+-4.5303 arithmetic-precise-order-0 454.1493+-5.1597 443.8042+-5.9946 might be 1.0233x faster arithmetic-precise-order-1 358.4477+-4.9916 356.4295+-5.8794 arithmetic-precise-order-2 389.2369+-4.4262 ? 392.3912+-7.0996 ? arithmetic-simple-order-1 450.9943+-6.4564 444.6961+-5.4135 might be 1.0142x faster arithmetic-simple-order-2 496.6518+-4.7088 494.2913+-9.8081 lz-string 340.4488+-6.0759 335.6356+-1.8921 might be 1.0143x faster <arithmetic> 405.1187+-0.8772 ^ 399.9326+-1.9149 ^ definitely 1.0130x faster <geometric> * 399.5683+-0.8247 ^ 394.7948+-1.7318 ^ definitely 1.0121x faster <harmonic> 394.0692+-0.8941 ^ 389.6772+-1.6030 ^ definitely 1.0113x faster TipOfTree FixScopeWatch All benchmarks: <arithmetic> 100.4300+-1.9447 99.7581+-0.1594 might be 1.0067x faster <geometric> 13.4793+-0.0268 13.4381+-0.0311 might be 1.0031x faster <harmonic> 3.3899+-0.0122 ^ 3.3609+-0.0085 ^ definitely 1.0086x faster TipOfTree FixScopeWatch Geomean of preferred means: <scaled-result> 64.9407+-0.4128 64.6593+-0.2560 might be 1.0044x faster
Benjamin Poulain
Comment 4 2015-03-03 20:23:03 PST
Comment on attachment 247826 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=247826&action=review Overall I think this is a better approach. Honestly, I don't know enough about this code to catch a bug in review. rs=me but if you are not confident about everything, better get a second review. > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3626 > + // loads from the scope register later, as that would prevent the DFG from trackign the Typo here: trackign > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:3633 > + if (JSFunction* function = callee->dynamicCastConstant<JSFunction*>()) > + result = weakJSConstant(function->scope()); > + else > + result = addToGraph(GetScope, callee); Personally I would not bother with this unless it makes a difference in benchmarks.
Filip Pizlo
Comment 5 2015-03-03 21:27:43 PST
Note You need to log in before you can comment on or make changes to this bug.