WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
74899
If we detect that we can use the JIT, don't use computed opcode lookups
https://bugs.webkit.org/show_bug.cgi?id=74899
Summary
If we detect that we can use the JIT, don't use computed opcode lookups
Filip Pizlo
Reported
2011-12-19 16:41:35 PST
When building with both interpreter and JIT enabled, we emit bytecode that uses jump locations for opcodes. The JIT then has to decode these into opcodes. Instead, if we detect that we have both the interpreter and the JIT, and the JIT is enabled, we should opt to use regular opcodes at run-time.
Attachments
the patch
(5.09 KB, patch)
2011-12-19 16:46 PST
,
Filip Pizlo
barraclough
: review+
Details
Formatted Diff
Diff
the patch
(5.82 KB, patch)
2011-12-19 18:21 PST
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
the patch
(5.28 KB, patch)
2011-12-19 18:22 PST
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2011-12-19 16:41:57 PST
<
rdar://problem/10604551
>
Filip Pizlo
Comment 2
2011-12-19 16:46:17 PST
Created
attachment 119950
[details]
the patch Performance results forthcoming.
Gavin Barraclough
Comment 3
2011-12-19 16:50:12 PST
Comment on
attachment 119950
[details]
the patch Please add extra assert as discussed and make comment less philosophical.
Filip Pizlo
Comment 4
2011-12-19 17:32:23 PST
Here's the performance when running in the default desktop mode (JIT compiled in, interpreter not compiled in). Benchmark report for SunSpider, V8, and Kraken on oldmac (MacPro4,1). VMs tested: "TipOfTreeJIT" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc (
r103278
) "EasyOpcodesJIT" at /Volumes/Data/pizlo/OpenSource/WebKitBuild/Release/jsc (
r103278
) 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. TipOfTreeJIT EasyOpcodesJIT SunSpider: 3d-cube 7.5395+-0.0507 7.5279+-0.0481 3d-morph 10.0457+-0.0509 10.0344+-0.0451 3d-raytrace 9.0963+-0.0739 ? 9.1780+-0.0750 ? access-binary-trees 1.9389+-0.0175 ? 1.9456+-0.0343 ? access-fannkuch 9.1671+-0.0126 ? 9.2053+-0.0535 ? access-nbody 4.7911+-0.0426 4.7491+-0.0187 access-nsieve 3.9309+-0.0785 3.8620+-0.0602 might be 1.0179x faster bitops-3bit-bits-in-byte 1.5001+-0.0147 ? 1.5138+-0.0214 ? bitops-bits-in-byte 6.1256+-0.0175 ? 6.1523+-0.0412 ? bitops-bitwise-and 3.9886+-0.0234 ? 4.0116+-0.0414 ? bitops-nsieve-bits 6.9498+-0.0897 6.8302+-0.0374 might be 1.0175x faster controlflow-recursive 2.8409+-0.0183 ? 2.8578+-0.0147 ? crypto-aes 9.2483+-0.0530 ? 9.3507+-0.1194 ? might be 1.0111x slower crypto-md5 3.0288+-0.0508 3.0133+-0.0266 crypto-sha1 2.6884+-0.0302 2.6757+-0.0166 date-format-tofte 13.3116+-0.1481 ^ 12.9479+-0.1100 ^ definitely 1.0281x faster date-format-xparb 12.9034+-0.1811 12.8167+-0.1253 math-cordic 8.7532+-0.0772 ^ 8.6436+-0.0290 ^ definitely 1.0127x faster math-partial-sums 12.6132+-0.0291 ? 12.6511+-0.0314 ? math-spectral-norm 3.1847+-0.0296 3.1827+-0.0111 regexp-dna 10.7769+-0.0793 ? 11.0031+-0.2361 ? might be 1.0210x slower string-base64 5.2207+-0.0507 ? 5.2888+-0.0693 ? might be 1.0130x slower string-fasta 8.8432+-0.0537 8.7658+-0.0426 string-tagcloud 15.0136+-0.0979 ? 15.3506+-0.3029 ? might be 1.0224x slower string-unpack-code 25.6618+-0.2349 25.5322+-0.0692 string-validate-input 6.9126+-0.0915 ? 7.0594+-0.1381 ? might be 1.0212x slower <arithmetic> * 7.9260+-0.0342 ? 7.9288+-0.0291 ? might be 1.0004x slower <geometric> 6.4232+-0.0267 ? 6.4267+-0.0252 ? might be 1.0005x slower <harmonic> 5.0726+-0.0214 ? 5.0779+-0.0234 ? might be 1.0011x slower TipOfTreeJIT EasyOpcodesJIT V8: crypto 93.1876+-0.2248 ? 93.5095+-0.5503 ? deltablue 205.2260+-1.7771 204.5077+-0.8356 earley-boyer 120.2805+-1.5788 119.8886+-1.4950 raytrace 64.2879+-1.2143 63.5429+-0.6459 might be 1.0117x faster regexp 147.2019+-0.3245 ? 147.4583+-0.8038 ? richards 168.9736+-0.6030 ! 171.0569+-0.5521 ! definitely 1.0123x slower splay 108.6977+-1.6918 ? 110.4101+-2.6557 ? might be 1.0158x slower <arithmetic> 129.6936+-0.4921 ? 130.0534+-0.4275 ? might be 1.0028x slower <geometric> * 121.8796+-0.5721 ? 122.1335+-0.5029 ? might be 1.0021x slower <harmonic> 114.0059+-0.7270 ? 114.0755+-0.5778 ? might be 1.0006x slower TipOfTreeJIT EasyOpcodesJIT Kraken: ai-astar 896.7456+-0.6032 ? 897.3953+-1.2333 ? audio-beat-detection 233.3495+-1.2969 232.7196+-1.2799 audio-dft 351.8302+-4.2714 ^ 341.6509+-4.9691 ^ definitely 1.0298x faster audio-fft 146.2062+-1.5776 145.7038+-1.5617 audio-oscillator 345.1878+-2.6331 345.1877+-3.0111 imaging-darkroom 361.6388+-7.4628 ? 362.0052+-7.5605 ? imaging-desaturate 288.4202+-0.9100 ? 288.4794+-1.4778 ? imaging-gaussian-blur 630.8954+-0.4635 ? 633.3607+-2.7304 ? json-parse-financial 86.7778+-0.4234 85.9769+-0.4040 json-stringify-tinderbox 99.7308+-0.4471 99.6821+-0.6314 stanford-crypto-aes 141.0035+-0.6337 ? 142.2376+-1.8364 ? stanford-crypto-ccm 138.0768+-1.1320 137.9783+-0.9424 stanford-crypto-pbkdf2 280.7540+-2.1327 280.6523+-2.4349 stanford-crypto-sha256-iterative 117.3794+-0.2535 ^ 116.2762+-0.1576 ^ definitely 1.0095x faster <arithmetic> * 294.1426+-0.6597 293.5219+-0.5650 might be 1.0021x faster <geometric> 232.5926+-0.5120 231.9035+-0.5539 might be 1.0030x faster <harmonic> 189.7743+-0.3474 189.1337+-0.5410 might be 1.0034x faster TipOfTreeJIT EasyOpcodesJIT All benchmarks: <arithmetic> 111.3176+-0.2360 111.1879+-0.1975 might be 1.0012x faster <geometric> 29.0036+-0.0892 28.9956+-0.0799 might be 1.0003x faster <harmonic> 8.9340+-0.0371 ? 8.9428+-0.0403 ? might be 1.0010x slower TipOfTreeJIT EasyOpcodesJIT Geomean of preferred means: <scaled-result> 65.7421+-0.1891 ? 65.7493+-0.1397 ? might be 1.0001x slower
Filip Pizlo
Comment 5
2011-12-19 18:21:58 PST
Created
attachment 119966
[details]
the patch Fixed some build issues.
Filip Pizlo
Comment 6
2011-12-19 18:22:48 PST
Created
attachment 119967
[details]
the patch Ooops, previous patch disabled the JIT!
Filip Pizlo
Comment 7
2011-12-19 18:39:40 PST
Here's the performance of compiling both JIT and interpreter and disabling the former at run-time. Benchmark report for SunSpider on oldmac (MacPro4,1). VMs tested: "TipOfTreeInt" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc (
r103278
) "EasyOpcodesInt" at /Volumes/Data/pizlo/OpenSource/WebKitBuild/Release/jsc (
r103278
) 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. TipOfTreeInt EasyOpcodesInt 3d-cube 35.0553+-0.1691 35.0126+-0.1015 3d-morph 42.2603+-0.0718 ? 42.7716+-0.7008 ? might be 1.0121x slower 3d-raytrace 43.7560+-0.2087 ? 44.0274+-0.1054 ? access-binary-trees 13.1961+-0.0515 ? 13.3273+-0.1467 ? access-fannkuch 95.2489+-0.3364 ? 96.3547+-1.4339 ? might be 1.0116x slower access-nbody 41.7445+-0.0699 ? 41.9914+-0.2718 ? access-nsieve 20.4432+-0.0201 20.4422+-0.0198 bitops-3bit-bits-in-byte 31.7849+-0.7682 30.8484+-0.4725 might be 1.0304x faster bitops-bits-in-byte 35.5646+-0.1286 35.5140+-0.0635 bitops-bitwise-and 32.8943+-0.0627 ? 32.9551+-0.0928 ? bitops-nsieve-bits 41.6181+-0.0303 ? 41.6376+-0.0543 ? controlflow-recursive 18.4945+-0.0153 ! 18.9301+-0.3852 ! definitely 1.0236x slower crypto-aes 31.0078+-0.0857 ! 31.3228+-0.0776 ! definitely 1.0102x slower crypto-md5 21.3093+-0.3618 ? 21.3548+-0.0678 ? crypto-sha1 22.0936+-0.1347 22.0175+-0.1325 date-format-tofte 23.6500+-0.1102 ? 24.0068+-0.5084 ? might be 1.0151x slower date-format-xparb 20.0848+-0.4344 ^ 18.9634+-0.2544 ^ definitely 1.0591x faster math-cordic 57.2663+-0.5728 56.4751+-0.2504 might be 1.0140x faster math-partial-sums 41.2285+-2.5409 39.3597+-0.2126 might be 1.0475x faster math-spectral-norm 29.6713+-0.0317 ^ 29.4547+-0.0423 ^ definitely 1.0074x faster regexp-dna 202.7959+-0.7097 ^ 190.3918+-0.4315 ^ definitely 1.0652x faster string-base64 21.0234+-0.0906 ? 21.1149+-0.1061 ? string-fasta 27.1034+-0.0347 ^ 26.9153+-0.0750 ^ definitely 1.0070x faster string-tagcloud 36.4908+-0.1104 ! 37.3402+-0.1309 ! definitely 1.0233x slower string-unpack-code 57.6505+-0.2517 ! 60.7206+-0.1348 ! definitely 1.0533x slower string-validate-input 17.9087+-0.2036 ? 18.1085+-0.2440 ? might be 1.0112x slower <arithmetic> * 40.8210+-0.1367 ^ 40.4369+-0.0657 ^ definitely 1.0095x faster <geometric> 33.4126+-0.1207 33.3621+-0.0488 might be 1.0015x faster <harmonic> 29.3947+-0.1009 29.3911+-0.0512 might be 1.0001x faster
Filip Pizlo
Comment 8
2011-12-19 18:42:50 PST
Landed in
http://trac.webkit.org/changeset/103292
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug