Skip to content

Optimize literal storage. #1168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2016
Merged

Conversation

zherczeg
Copy link
Member

3K binary size reduction 156K -> 153K (1600 lines removed, 700 added)

Benchmark Perf (sec)
3d-cube.js 1.146 -> 1.141 : +0.506%
3d-raytrace.js 1.317 -> 1.250 : +5.094%
access-binary-trees.js 0.674 -> 0.631 : +6.318%
access-fannkuch.js 2.847 -> 2.847 : +0.005%
access-nbody.js 1.387 -> 1.319 : +4.907%
bitops-3bit-bits-in-byte.js 0.631 -> 0.636 : -0.765%
bitops-bits-in-byte.js 0.917 -> 0.928 : -1.162%
bitops-bitwise-and.js 1.923 -> 1.510 : +21.463%
bitops-nsieve-bits.js 2.243 -> 2.227 : +0.718%
controlflow-recursive.js 0.475 -> 0.462 : +2.736%
crypto-aes.js 1.244 -> 1.229 : +1.252%
crypto-md5.js 0.844 -> 0.818 : +3.068%
crypto-sha1.js 0.790 -> 0.769 : +2.632%
date-format-tofte.js 1.018 -> 0.917 : +9.907%
date-format-xparb.js 0.553 -> 0.503 : +9.121%
math-cordic.js 1.666 -> 1.624 : +2.565%
math-partial-sums.js 0.986 -> 0.874 : +11.285%
math-spectral-norm.js 0.699 -> 0.672 : +3.820%
string-base64.js 2.244 -> 2.165 : +3.521%
string-fasta.js 2.123 -> 1.995 : +6.031%
Geometric mean: +4.799%

@LaszloLango LaszloLango added enhancement An improvement performance Affects performance binary size Affects binary size labels Jun 24, 2016
@zherczeg zherczeg force-pushed the literal_opt branch 3 times, most recently from 99b9dd0 to ef20c71 Compare June 24, 2016 10:42
@LaszloLango
Copy link
Contributor

LGTM

@zherczeg
Copy link
Member Author

@franc0is After this change the snapshot only stores raw strings and numbers, so changing the magic strings or introducing (removing) string types do not affect the snapshot version.

The new literal storage keeps ecma strings rather than having a
custom string implementation which duplicates the string management
routines. Conversions between string implementations are eliminated
which improved the performance by 4%.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
@dbatyai
Copy link
Member

dbatyai commented Jun 27, 2016

LGTM

@zherczeg zherczeg merged commit 0a32c97 into jerryscript-project:master Jun 27, 2016
@zherczeg zherczeg deleted the literal_opt branch June 27, 2016 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary size Affects binary size enhancement An improvement performance Affects performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants