RESOLVED FIXED 75291
spill unboxed values in DFG 32_64
https://bugs.webkit.org/show_bug.cgi?id=75291
Summary spill unboxed values in DFG 32_64
Yuqiang Xian
Reported 2011-12-27 22:45:08 PST
Currently all the values are spilled as boxed in DFG 32_64, which is not necessary and introduces additional stores/loads. Instead we can spill them as unboxed if feasible. It can be applied to the Integers, Cells and Booleans in DFG 32_64. Doubles are left as is because they don't need to be boxed at all. The modifications to the spill/fill and the OSR exit are required, as well as a bug fix to the "isUnknownJS" logic. Patch forthcoming.
Attachments
the patch (42.21 KB, patch)
2011-12-27 22:51 PST, Yuqiang Xian
no flags
Yuqiang Xian
Comment 1 2011-12-27 22:51:23 PST
Created attachment 120636 [details] the patch Performance result: slight win (~0.6%) on V8 on ia32 (Core i7 Nehalem) Linux. Collected 12 samples per benchmark/VM, with 4 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. ToT SpillIntCellBoolean SunSpider: 3d-cube 7.3869+-0.0443 7.3310+-0.0571 3d-morph 10.6693+-0.0507 ? 10.6780+-0.0314 ? 3d-raytrace 9.6109+-0.0488 9.5656+-0.0453 access-binary-trees 1.8772+-0.0392 1.8675+-0.0386 access-fannkuch 10.5697+-0.0564 ! 10.8662+-0.0418 ! definitely 1.0280x slower access-nbody 5.3871+-0.0445 ? 5.4150+-0.0481 ? access-nsieve 3.7314+-0.0487 3.6964+-0.0520 bitops-3bit-bits-in-byte 1.1904+-0.0395 ? 1.1929+-0.0411 ? bitops-bits-in-byte 4.5915+-0.0400 4.5815+-0.0261 bitops-bitwise-and 4.2406+-0.0293 4.2254+-0.0214 bitops-nsieve-bits 6.7305+-0.0821 ? 6.7554+-0.0808 ? controlflow-recursive 2.8442+-0.0548 2.7793+-0.0585 might be 1.0234x faster crypto-aes 9.6263+-0.0558 ^ 9.5084+-0.0599 ^ definitely 1.0124x faster crypto-md5 2.9443+-0.0457 ? 2.9561+-0.0424 ? crypto-sha1 2.5448+-0.0583 2.5068+-0.0467 might be 1.0152x faster date-format-tofte 12.5186+-0.0811 ^ 11.6395+-0.0432 ^ definitely 1.0755x faster date-format-xparb 12.0059+-1.0066 11.8873+-0.0705 math-cordic 9.2077+-0.0509 9.1939+-0.0435 math-partial-sums 13.8908+-0.0561 ? 13.9097+-0.0466 ? math-spectral-norm 2.6147+-0.0503 2.5875+-0.0421 might be 1.0105x faster regexp-dna 9.1039+-0.0630 ? 9.1299+-0.0819 ? string-base64 5.4430+-0.0586 5.4265+-0.0555 string-fasta 9.5071+-0.0423 9.4714+-0.0579 string-tagcloud 15.4707+-0.0764 ^ 15.3426+-0.0423 ^ definitely 1.0083x faster string-unpack-code 24.3361+-0.1073 24.2747+-0.0494 string-validate-input 7.4383+-0.0473 ^ 7.2637+-0.0198 ^ definitely 1.0240x faster <arithmetic> * 7.9032+-0.0457 7.8482+-0.0194 might be 1.0070x faster <geometric> 6.3109+-0.0261 6.2710+-0.0247 might be 1.0064x faster <harmonic> 4.8023+-0.0345 4.7752+-0.0385 might be 1.0057x faster ToT SpillIntCellBoolean V8: crypto 97.2088+-0.4892 ^ 95.0872+-0.3198 ^ definitely 1.0223x faster deltablue 168.1859+-0.7193 167.2954+-0.5290 earley-boyer 107.8478+-0.3034 107.5352+-0.1209 raytrace 53.3845+-0.7817 52.8807+-0.5329 regexp 127.4918+-0.1960 126.9930+-0.3157 richards 173.9396+-0.4849 ? 176.4387+-2.2390 ? might be 1.0144x slower splay 126.4676+-0.4146 ^ 124.5180+-0.4407 ^ definitely 1.0157x faster <arithmetic> 122.0751+-0.2284 121.5355+-0.3470 might be 1.0044x faster <geometric> * 114.8709+-0.3256 ^ 114.1350+-0.2897 ^ definitely 1.0064x faster <harmonic> 106.4733+-0.5046 ^ 105.6085+-0.3493 ^ definitely 1.0082x faster ToT SpillIntCellBoolean Kraken: ai-astar 782.0847+-2.3402 779.7733+-0.9971 audio-beat-detection 241.6800+-1.9073 239.4006+-0.5053 audio-dft 364.3798+-3.5149 363.2535+-4.4820 audio-fft 155.4703+-0.3388 ^ 153.7778+-0.0465 ^ definitely 1.0110x faster audio-oscillator 336.4074+-2.4092 ? 338.0959+-2.2200 ? imaging-darkroom 382.7754+-10.0518 381.5660+-9.4657 imaging-desaturate 315.5066+-0.1044 ! 316.6295+-0.7696 ! definitely 1.0036x slower imaging-gaussian-blur 590.4285+-1.8883 ? 593.3130+-1.6824 ? json-parse-financial 68.5218+-0.4322 67.9758+-0.3699 json-stringify-tinderbox 102.3024+-1.0079 101.5212+-0.4966 stanford-crypto-aes 131.8947+-0.3136 ? 131.8996+-0.3047 ? stanford-crypto-ccm 128.3543+-0.4875 ^ 126.8451+-0.5070 ^ definitely 1.0119x faster stanford-crypto-pbkdf2 278.4242+-0.7731 ? 278.9995+-0.9072 ? stanford-crypto-sha256-iterative 108.8647+-0.4102 107.9071+-0.7944 <arithmetic> * 284.7925+-1.1519 284.3541+-1.0069 might be 1.0015x faster <geometric> 226.2851+-0.8740 225.4726+-0.7258 might be 1.0036x faster <harmonic> 180.4876+-0.6601 179.4361+-0.5094 might be 1.0059x faster ToT SpillIntCellBoolean All benchmarks: <arithmetic> 107.3852+-0.3860 107.1438+-0.3251 might be 1.0023x faster <geometric> 28.2377+-0.0990 28.0817+-0.0866 might be 1.0056x faster <harmonic> 8.4572+-0.0597 8.4093+-0.0663 might be 1.0057x faster ToT SpillIntCellBoolean Geomean of preferred means: <scaled-result> 63.7054+-0.2187 63.3890+-0.1483 might be 1.0050x faster
Filip Pizlo
Comment 2 2011-12-28 20:01:45 PST
Comment on attachment 120636 [details] the patch Good stuff!
Yuqiang Xian
Comment 3 2011-12-28 20:36:22 PST
Yuqiang Xian
Comment 4 2011-12-28 20:36:53 PST
Comment on attachment 120636 [details] the patch Clearing flags.
Note You need to log in before you can comment on or make changes to this bug.