Bug 68580

Summary: DFG JIT cannot compile op_new_object, op_new_array, op_new_array_buffer, or op_new_regexp
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch oliver: review+

Filip Pizlo
Reported 2011-09-21 15:45:38 PDT
Not being able to compile these opcodes significantly reduces coverage in benchmarks and probably real websites. The DFG should support them.
Attachments
the patch (24.01 KB, patch)
2011-09-27 21:33 PDT, Filip Pizlo
oliver: review+
Filip Pizlo
Comment 1 2011-09-27 17:15:39 PDT
Looks like having op_new_object alone is a 3% win on Kraken. I'll plow ahead and implement the others as well, though these will be fairly naive implementations designed to just give us more coverage.
Filip Pizlo
Comment 2 2011-09-27 21:18:13 PDT
Implementing op_new_object, op_new_array, and op_new_array_buffer is a win on Kraken and V8, and neutral on SunSpider. But implementing op_new_regexp is a regression on SunSpider, because string-validate-input does things that fail speculation due to some static speculation logic on comparisons that's still hanging around. Recommendation: reintroduce DFG_RESTRICTIONS and restrict op_new_regexp until we fix those regressions. Benchmark report for SunSpider, V8, and Kraken. VMs tested: "TipOfTree" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc "NewObjArr" at /Volumes/Data/pizlo/senary/OpenSource/WebKitBuild/Release/jsc Collected 12 samples per benchmark/VM, with 4 VM invocations per benchmark. 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 NewObjArr SunSpider: 3d-cube 7.6069+-0.1990 ? 7.6847+-0.2081 ? might be 1.0102x slower 3d-morph 7.3532+-0.1059 ? 7.4783+-0.1642 ? might be 1.0170x slower 3d-raytrace 8.0790+-0.2086 ? 8.1011+-0.1652 ? access-binary-trees 2.0403+-0.0725 2.0396+-0.0843 access-fannkuch 6.2823+-0.1056 ? 6.2945+-0.0926 ? access-nbody 3.8682+-0.1419 3.6726+-0.0948 might be 1.0533x faster access-nsieve 2.6062+-0.0740 ? 2.6352+-0.0709 ? might be 1.0111x slower bitops-3bit-bits-in-byte 1.7547+-0.0213 1.7003+-0.0410 might be 1.0320x faster bitops-bits-in-byte 2.7603+-0.0593 ? 2.7621+-0.1151 ? bitops-bitwise-and 3.3824+-0.0945 ? 3.4179+-0.0806 ? might be 1.0105x slower bitops-nsieve-bits 5.4669+-0.1184 ? 5.6133+-0.1420 ? might be 1.0268x slower controlflow-recursive 2.1387+-0.0375 2.0752+-0.0489 might be 1.0306x faster crypto-aes 6.1968+-0.1590 ! 6.5941+-0.1909 ! definitely 1.0641x slower crypto-md5 2.8109+-0.0801 ? 2.8470+-0.0919 ? might be 1.0128x slower crypto-sha1 2.4519+-0.0526 ? 2.4965+-0.0925 ? might be 1.0182x slower date-format-tofte 10.1652+-0.2940 ? 10.2501+-0.3256 ? date-format-xparb 9.6200+-0.2456 9.4512+-0.4918 might be 1.0179x faster math-cordic 6.3152+-0.1337 ? 6.3721+-0.1215 ? math-partial-sums 7.4580+-0.0947 ? 7.5503+-0.1409 ? might be 1.0124x slower math-spectral-norm 2.9994+-0.1077 2.9799+-0.0897 regexp-dna 10.8572+-0.2331 ? 11.0281+-0.2246 ? might be 1.0157x slower string-base64 5.8501+-0.1934 ? 5.9021+-0.1795 ? string-fasta 6.9347+-0.1855 ? 6.9611+-0.1681 ? string-tagcloud 11.8963+-0.3418 11.8376+-0.3378 string-unpack-code 21.2604+-0.5087 21.0444+-0.3425 might be 1.0103x faster string-validate-input 6.3037+-0.2205 6.2693+-0.1517 <arithmetic> 6.3253+-0.0353 ? 6.3484+-0.0299 ? <geometric> 5.2192+-0.0269 ? 5.2329+-0.0235 ? <harmonic> 4.3191+-0.0305 4.3127+-0.0407 TipOfTree NewObjArr V8: crypto 70.8299+-0.2972 70.4997+-0.2495 deltablue 231.4250+-0.8306 ? 231.6184+-1.4313 ? earley-boyer 89.7968+-0.3721 89.2143+-0.3464 raytrace 62.3036+-0.2579 ? 62.3904+-0.3775 ? regexp 103.8305+-0.4649 103.6756+-0.3347 richards 197.2494+-0.6818 ? 197.3745+-0.4847 ? splay 95.0562+-0.5740 ^ 91.0451+-0.6727 ^ definitely 1.0441x faster <arithmetic> 121.4988+-0.1952 ^ 120.8311+-0.2861 ^ definitely 1.0055x faster <geometric> 108.6305+-0.1401 ^ 107.8119+-0.2417 ^ definitely 1.0076x faster <harmonic> 98.8004+-0.1205 ^ 97.9876+-0.2559 ^ definitely 1.0083x faster TipOfTree NewObjArr Kraken: ai-astar 546.8545+-3.6949 545.3186+-4.3388 audio-beat-detection 204.9062+-1.9674 ^ 190.9386+-0.9909 ^ definitely 1.0732x faster audio-dft 424.9145+-2.3221 ^ 296.9401+-3.0409 ^ definitely 1.4310x faster audio-fft 139.2435+-0.4448 ^ 125.6971+-0.4805 ^ definitely 1.1078x faster audio-oscillator 255.0111+-1.8242 ? 256.7649+-1.8605 ? imaging-darkroom 417.7086+-1.1558 ? 419.8134+-2.8078 ? imaging-desaturate 223.0863+-0.6879 223.0231+-0.8260 imaging-gaussian-blur 579.0343+-1.2023 ? 579.4247+-1.3042 ? json-parse-financial 48.6793+-0.3749 48.6245+-0.2575 json-stringify-tinderbox 68.1574+-0.2439 ! 68.7362+-0.2441 ! definitely 1.0085x slower stanford-crypto-aes 134.2218+-0.9676 ^ 129.9201+-1.2568 ^ definitely 1.0331x faster stanford-crypto-ccm 103.4385+-0.7074 103.2702+-0.5201 stanford-crypto-pbkdf2 200.0034+-0.7682 ^ 194.1208+-0.8295 ^ definitely 1.0303x faster stanford-crypto-sha256-iterative 84.2175+-0.2737 ? 84.5064+-0.3092 ? <arithmetic> 244.9626+-0.4782 ^ 233.3642+-0.6612 ^ definitely 1.0497x faster <geometric> 188.3567+-0.4424 ^ 180.7748+-0.5055 ^ definitely 1.0419x faster <harmonic> 142.8848+-0.4315 ^ 139.4901+-0.3682 ^ definitely 1.0243x faster TipOfTree NewObjArr All benchmarks: <arithmetic> 94.5623+-0.1303 ^ 91.0207+-0.2131 ^ definitely 1.0389x faster <geometric> 23.8698+-0.0692 ^ 23.5873+-0.0644 ^ definitely 1.0120x faster <harmonic> 7.5946+-0.0522 7.5800+-0.0698
Filip Pizlo
Comment 3 2011-09-27 21:31:49 PDT
Updated numbers after merging with https://bugs.webkit.org/show_bug.cgi?id=68932 Benchmark report for SunSpider, V8, and Kraken. VMs tested: "TipOfTree" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc "NewObjArr" at /Volumes/Data/pizlo/senary/OpenSource/WebKitBuild/Release/jsc Collected 12 samples per benchmark/VM, with 4 VM invocations per benchmark. 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 NewObjArr SunSpider: 3d-cube 7.6772+-0.2269 ? 7.6857+-0.2541 ? 3d-morph 7.3632+-0.1056 ? 7.3864+-0.1331 ? 3d-raytrace 8.0317+-0.1375 ? 8.2110+-0.2176 ? might be 1.0223x slower access-binary-trees 2.0712+-0.0911 ? 2.1195+-0.1247 ? might be 1.0233x slower access-fannkuch 6.3577+-0.1333 6.2040+-0.0759 might be 1.0248x faster access-nbody 3.6669+-0.1079 3.6163+-0.0966 might be 1.0140x faster access-nsieve 2.5418+-0.0462 ? 2.5684+-0.0595 ? might be 1.0105x slower bitops-3bit-bits-in-byte 1.7133+-0.0264 1.7003+-0.0275 bitops-bits-in-byte 2.6883+-0.0732 ? 2.7248+-0.0730 ? might be 1.0136x slower bitops-bitwise-and 3.4668+-0.1048 ? 3.4809+-0.1225 ? bitops-nsieve-bits 5.4754+-0.1628 5.4635+-0.1165 controlflow-recursive 2.0714+-0.0706 2.0702+-0.0485 crypto-aes 6.1978+-0.2016 ? 6.6180+-0.2952 ? might be 1.0678x slower crypto-md5 2.7825+-0.0954 ? 2.8597+-0.1406 ? might be 1.0277x slower crypto-sha1 2.4214+-0.0911 ? 2.5091+-0.0638 ? might be 1.0362x slower date-format-tofte 10.4897+-0.4051 10.0904+-0.3486 might be 1.0396x faster date-format-xparb 9.7609+-0.2870 9.6647+-0.3170 math-cordic 6.3127+-0.1011 6.2664+-0.1367 math-partial-sums 7.7387+-0.1878 7.5655+-0.1525 might be 1.0229x faster math-spectral-norm 2.8640+-0.0801 2.7946+-0.0654 might be 1.0249x faster regexp-dna 10.8194+-0.2209 10.7082+-0.1562 might be 1.0104x faster string-base64 5.8993+-0.2858 ? 6.0486+-0.3350 ? might be 1.0253x slower string-fasta 7.0743+-0.2303 6.8448+-0.1370 might be 1.0335x faster string-tagcloud 11.9568+-0.3840 11.9143+-0.4237 string-unpack-code 21.5022+-0.5827 21.1597+-0.5363 might be 1.0162x faster string-validate-input 6.3864+-0.2204 6.3736+-0.2340 <arithmetic> 6.3589+-0.0511 6.3326+-0.0247 <geometric> 5.2112+-0.0421 ? 5.2132+-0.0273 ? <harmonic> 4.2797+-0.0500 ? 4.2961+-0.0374 ? TipOfTree NewObjArr V8: crypto 70.7538+-0.3176 ? 70.8774+-0.4921 ? deltablue 228.2342+-0.9343 ? 230.8113+-1.7273 ? might be 1.0113x slower earley-boyer 89.4177+-0.2268 ? 89.8321+-0.2482 ? raytrace 62.4810+-0.3734 ? 62.9065+-1.0127 ? regexp 105.0118+-0.3987 ^ 103.5674+-0.3795 ^ definitely 1.0139x faster richards 197.8091+-0.7066 ? 198.9686+-0.6894 ? splay 95.2704+-0.5647 ^ 90.6923+-0.4400 ^ definitely 1.0505x faster <arithmetic> 121.2826+-0.2835 121.0937+-0.2348 <geometric> 108.6315+-0.2380 ^ 108.1180+-0.2627 ^ definitely 1.0047x faster <harmonic> 98.8972+-0.2291 98.3311+-0.3495 TipOfTree NewObjArr Kraken: ai-astar 491.0886+-3.5918 487.8834+-3.4151 audio-beat-detection 204.7522+-1.0111 ^ 189.3919+-0.7289 ^ definitely 1.0811x faster audio-dft 425.8567+-4.5656 ^ 279.1306+-3.2984 ^ definitely 1.5257x faster audio-fft 139.6173+-0.3716 ^ 126.9211+-0.8085 ^ definitely 1.1000x faster audio-oscillator 256.7287+-1.8192 256.4727+-1.7237 imaging-darkroom 437.8020+-1.4023 ^ 417.0573+-1.2596 ^ definitely 1.0497x faster imaging-desaturate 223.1644+-0.3189 ? 223.4193+-0.4615 ? imaging-gaussian-blur 581.3705+-2.0634 577.9954+-1.5586 json-parse-financial 47.3499+-0.2833 ! 48.3064+-0.3268 ! definitely 1.0202x slower json-stringify-tinderbox 68.4704+-0.2395 ? 69.0268+-0.3627 ? stanford-crypto-aes 134.2183+-0.7291 ^ 130.4393+-1.3538 ^ definitely 1.0290x faster stanford-crypto-ccm 102.8529+-0.2783 ^ 101.8995+-0.4736 ^ definitely 1.0094x faster stanford-crypto-pbkdf2 202.2117+-1.7048 ^ 193.4944+-2.7995 ^ definitely 1.0451x faster stanford-crypto-sha256-iterative 83.9772+-0.2160 ! 85.1002+-0.2948 ! definitely 1.0134x slower <arithmetic> 242.8186+-0.6890 ^ 227.6099+-0.6454 ^ definitely 1.0668x faster <geometric> 187.4703+-0.4093 ^ 178.3609+-0.4881 ^ definitely 1.0511x faster <harmonic> 142.0359+-0.2941 ^ 138.7646+-0.4057 ^ definitely 1.0236x faster TipOfTree NewObjArr All benchmarks: <arithmetic> 93.9100+-0.2349 ^ 89.3371+-0.2000 ^ definitely 1.0512x faster <geometric> 23.8160+-0.1179 ^ 23.4539+-0.0750 ^ definitely 1.0154x faster <harmonic> 7.5265+-0.0857 ? 7.5514+-0.0641 ?
Filip Pizlo
Comment 4 2011-09-27 21:33:56 PDT
Created attachment 108959 [details] the patch
Oliver Hunt
Comment 5 2011-09-27 22:13:38 PDT
Comment on attachment 108959 [details] the patch r=me
Filip Pizlo
Comment 6 2011-09-27 22:32:31 PDT
Landed in r96189.
Simon Fraser (smfr)
Comment 7 2011-09-28 20:06:52 PDT
Filip Pizlo
Comment 8 2011-09-28 21:48:20 PDT
(In reply to comment #7) > This broke some tests:https://bugs.webkit.org/show_bug.cgi?id=69038 Looking into it!
Note You need to log in before you can comment on or make changes to this bug.