-
Notifications
You must be signed in to change notification settings - Fork 683
Various enhancements #914
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
Various enhancements #914
Conversation
b5a0a5c
to
4c87f0a
Compare
RPi2 perf results
|
@@ -818,12 +818,10 @@ ecma_uint32_to_utf8_string (uint32_t value, /**< value to convert */ | |||
* | |||
* @return number - result of conversion. | |||
*/ | |||
ecma_number_t | |||
ecma_number_t __attr_always_inline___ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Where does it make a difference? Performance results show no significant change that would justify the need for this attribute. (BTW, does it have an effect on the code size?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't make any difference. The binary sizes are the same.
There are the results without this attributes:
(It's possible, that this gain is only noise)
Benchmark | Perf(+ is better)
3d-cube.js | 2.645s -> 2.617s : +1.071% (+-0.824%) : [+]
access-binary-trees.js | 1.410s -> 1.430s : -1.418% (+-0.000%) : [-]
access-fannkuch.js | 7.985s -> 7.997s : -0.146% (+-0.460%) : [≈]
access-nbody.js | 3.083s -> 3.115s : -1.027% (+-0.526%) : [-]
bitops-3bit-bits-in-byte.js | 1.737s -> 1.713s : +1.344% (+-0.688%) : [+]
bitops-bits-in-byte.js | 2.660s -> 2.647s : +0.501% (+-0.929%) : [≈]
bitops-bitwise-and.js | 3.682s -> 3.780s : -2.671% (+-1.079%) : [-]
controlflow-recursive.js | 0.890s -> 0.887s : +0.374% (+-0.955%) : [≈]
crypto-aes.js | 4.727s -> 4.695s : +0.670% (+-0.512%) : [+]
crypto-md5.js | 21.542s -> 21.543s : -0.007% (+-0.451%) : [≈]
crypto-sha1.js | 9.767s -> 9.760s : +0.068% (+-0.448%) : [≈]
date-format-tofte.js | 2.233s -> 2.217s : +0.746% (+-0.846%) : [≈]
date-format-xparb.js | 1.085s -> 1.077s : +0.768% (+-1.137%) : [≈]
math-cordic.js | 3.005s -> 2.980s : +0.832% (+-0.829%) : [+]
math-partial-sums.js | 1.665s -> 1.680s : -0.901% (+-0.546%) : [-]
math-spectral-norm.js | 1.513s -> 1.487s : +1.762% (+-0.787%) : [+]
string-fasta.js | 4.542s -> 4.557s : -0.330% (+-0.611%) : [≈]
Geometric mean: | Speed up: 0.102% (+-0.179%) : [≈]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't add the attributes then. IMHO, the cleaner the code the better (i.e., we should avoid using attributes as much as we can).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @akiss77. If it doesn't have any performance gain, then don't add it.
And in general, the file headers should be double-checked. The headers of some now-touched files bear a 2014 copyright. |
4c87f0a
to
692adb2
Compare
@akiss77 @LaszloLango The PR is updated according the review. |
Thanks. LGTM (FWIW) |
It is strange that 'ecma_is_ex_string_magic' is not used in Jerry. May be removing it not the best solution. Isn't this feature needed for IoT.js? |
I didn't find any reference to this function in IoT.js, but there's a chance it will be used in the future, I agree with you, we should keep it. So I will update the PR. |
@bzsolt, could you raise an issue for this? |
const bool is_equal_hashes = (string1_p->hash == string2_p->hash); | ||
|
||
if (!is_equal_hashes) | ||
if (!(string1_p->hash == string2_p->hash)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (string1_p->hash != string2_p->hash)
After fix of #914 (comment) the patch LGTM. |
692adb2
to
b1854cb
Compare
@LaszloLango I've updated the PR. I've kept the external magic string related functions, and raised an issue for this topic: #922 |
I would call the patch "small refactorings". |
cc8708d
to
7c3b68e
Compare
Modifications: * eliminate unnecessary variables, functions * use ECMA_NUMBER macros where it is possible * simplify code * minor style fix (comments, increase-decrease operators) JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
7c3b68e
to
3f37769
Compare
Modifications:
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com