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:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user