Closed
Bug 584499
Opened 14 years ago
Closed 14 years ago
TM: optimize getelem for strings
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: gal, Assigned: gal)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(2 files, 2 obsolete files)
(deleted),
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
Open-code LIR instead of calling a builtin.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: general → gal
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #462913 -
Attachment is obsolete: true
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #462945 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Attachment #462970 -
Flags: review?(lw)
Comment 4•14 years ago
|
||
Comment on attachment 462970 [details] [diff] [review]
patch
Cute. What's its perf now?
>+ LIns *unitstr_ins = lir->ins2(LIR_addp,
>+ INS_CONSTPTR(JSString::unitStringTable),
>+ lir->ins2ImmI(LIR_lshp,
>+ lir->insUI2P(ch_ins),
>+ (sizeof(JSString) == 16) ? 4 : 5));
This is just asking to break. r+ with
JS_STATIC_ASSERT(sizeof(JSString) == 16 || sizeof(JSString) == 32);
Attachment #462970 -
Flags: review?(lw) → review+
Assignee | ||
Comment 5•14 years ago
|
||
Comment 6•14 years ago
|
||
Cachegrind results:
---------------------------------------------------------------
| millions of instructions executed |
| total | on-trace (may overestimate) |
---------------------------------------------------------------
| 111.202 111.481 (0.997x) | 20.797 20.809 (0.999x) | 3d-cube
| 56.990 56.949 (1.001x) | 22.313 22.313 (------) | 3d-morph
| 147.820 146.795 (1.007x) | 21.982 21.971 (------) | 3d-raytrace
| 77.548 77.418 (1.002x) | 17.401 17.400 (------) | access-binary-trees
| 183.728 183.440 (1.002x) | 103.707 103.704 (------) | access-fannkuch
| 41.565 41.405 (1.004x) | 17.553 17.551 (------) | access-nbody
| 60.014 59.983 (1.001x) | 27.013 27.012 (------) | access-nsieve
| 15.688 15.681 (------) | 2.862 2.862 (------) | bitops-3bit-bits-in-byte
| 43.303 43.285 (------) | 30.280 30.280 (------) | bitops-bits-in-byte
| 22.773 22.771 (------) | 10.219 10.219 (------) | bitops-bitwise-and
| 71.624 71.611 (------) | 39.453 39.453 (------) | bitops-nsieve-bits
| 42.397 42.309 (1.002x) | 26.655 26.654 (------) | controlflow-recursive
| 47.115 47.002 (1.002x) | 5.541 5.660 (0.979x) | crypto-md5
| 31.336 31.286 (1.002x) | 7.030 7.109 (0.989x) | crypto-sha1
| 127.956 127.903 (------) | 10.461 10.461 (------) | date-format-tofte
| 99.144 98.884 (1.003x) | 11.118 11.115 (------) | date-format-xparb
| 52.617 52.594 (------) | 27.614 27.614 (------) | math-cordic
| 38.415 38.409 (------) | 6.252 6.252 (------) | math-partial-sums
| 28.590 28.475 (1.004x) | 10.286 10.285 (------) | math-spectral-norm
| 100.938 100.915 (------) | 75.045 75.045 (------) | regexp-dna
| 44.076 40.705 (1.083x) | 8.098 10.397 (0.779x) | string-base64
| 123.213 122.919 (1.002x) | 24.544 24.543 (------) | string-fasta
| 272.611 269.835 (1.010x) | 6.840 6.671 (1.025x) | string-tagcloud
| 251.422 251.318 (------) | 5.637 5.635 (------) | string-unpack-code
| 64.494 63.696 (1.013x) | 7.401 7.521 (0.984x) | string-validate-input
-------
| 2156.590 2147.080 (1.004x) | 546.114 548.548 (0.996x) | all
string-base64 is a nice result.
Note that only the following tests had their codegen affected:
crypto-md5.js
crypto-sha1.js
date-format-xparb.js
string-base64.js
string-tagcloud.js
string-validate-input.js
Variation on others is due to the property cache.
Assignee | ||
Comment 7•14 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 8•14 years ago
|
||
Comment 9•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•