Improve multiplication in vm

This patch improves the ecma_integers_values multiplication by checking if the multiplier or multiplicand is power of 2.
If it is it uses right shift instead of multiplication.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2017-11-27 12:56:50 +01:00
committed by yichoi
parent 90f2473f08
commit 458dc58b59
3 changed files with 27 additions and 1 deletions
+1 -1
View File
@@ -1793,7 +1793,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
&& left_value != 0
&& right_value != 0)
{
result = ecma_make_integer_value (left_integer * right_integer);
result = ecma_integer_multiply (left_integer, right_integer);
break;
}