Skip to content

Improve equal operations. #1120

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

Conversation

zherczeg
Copy link
Member

@zherczeg zherczeg commented Jun 3, 2016

The code is simplified a lot (a lot of code is deleted).

@LaszloLango
Copy link
Contributor

Please measure the PR on RPi2.

@LaszloLango LaszloLango added the enhancement An improvement label Jun 3, 2016
@zherczeg
Copy link
Member Author

zherczeg commented Jun 3, 2016

Since equal is not a frequent operation, the difference is not big. Although it slightly improved the perf in 12 cases.

Benchmark Perf (sec)
3d-cube.js 1.490 -> 1.491 : -0.068%
3d-raytrace.js 1.539 -> 1.531 : +0.524%
access-binary-trees.js 0.763 -> 0.754 : +1.205%
access-fannkuch.js 3.253 -> 3.127 : +3.873%
access-nbody.js 1.589 -> 1.561 : +1.736%
bitops-3bit-bits-in-byte.js 0.793 -> 0.796 : -0.473%
bitops-bits-in-byte.js 1.043 -> 1.045 : -0.279%
bitops-bitwise-and.js 1.945 -> 1.907 : +1.959%
bitops-nsieve-bits.js 2.559 -> 2.525 : +1.340%
controlflow-recursive.js 0.548 -> 0.558 : -1.713%
crypto-aes.js 1.480 -> 1.456 : +1.635%
crypto-md5.js 0.929 -> 0.926 : +0.256%
crypto-sha1.js 0.872 -> 0.876 : -0.445%
date-format-tofte.js 1.173 -> 1.151 : +1.897%
date-format-xparb.js 0.612 -> 0.594 : +2.904%
math-cordic.js 2.000 -> 2.010 : -0.520%
math-partial-sums.js 1.124 -> 1.106 : +1.535%
math-spectral-norm.js 0.888 -> 0.897 : -0.966%
string-base64.js 4.736 -> 4.691 : +0.945%
string-fasta.js 2.267 -> 2.254 : +0.588%
Geometric mean: +0.806%

Binary sizes (bytes)
old:167192
new:166872

However, the binary size is decreased by 300 bytes, which is useful.

@LaszloLango LaszloLango added the binary size Affects binary size label Jun 3, 2016
{
// 1.
// Note: the (x == y) comparison captures the true case.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also fix comments in the touched functions? (// -> /* */)

@LaszloLango
Copy link
Contributor

LGTM

@zherczeg zherczeg force-pushed the strict_equal_optimization branch from 415d013 to d917467 Compare June 3, 2016 08:08
@@ -20,6 +20,7 @@
#include "ecma-array-object.h"
#include "ecma-builtins.h"
#include "ecma-conversion.h"
#include "ecma-comparison.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be above ecma-conversion.h

@dbatyai
Copy link
Member

dbatyai commented Jun 3, 2016

LGTM after the include is fixed

The implementation is simplified and optimized
resulting the removal a large amount of code.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
@zherczeg zherczeg force-pushed the strict_equal_optimization branch from d917467 to 6f33ab3 Compare June 3, 2016 09:11
@zherczeg zherczeg merged commit 6f33ab3 into jerryscript-project:master Jun 3, 2016
@zherczeg zherczeg deleted the strict_equal_optimization branch June 3, 2016 09:16
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants