py: Added optimised support for 3-argument calls to builtin.pow()

Updated modbuiltin.c to add conditional support for 3-arg calls to
pow() using MICROPY_PY_BUILTINS_POW3 config parameter. Added support in
objint_mpz.c for for optimised implementation.
This commit is contained in:
Nicko van Someren
2017-02-01 16:41:22 -07:00
committed by Paul Sokolovsky
parent 2486c4ff46
commit df0117c8ae
8 changed files with 80 additions and 4 deletions

View File

@@ -66,5 +66,6 @@ mp_obj_t mp_obj_int_abs(mp_obj_t self_in);
mp_obj_t mp_obj_int_unary_op(mp_uint_t op, mp_obj_t o_in);
mp_obj_t mp_obj_int_binary_op(mp_uint_t op, mp_obj_t lhs_in, mp_obj_t rhs_in);
mp_obj_t mp_obj_int_binary_op_extra_cases(mp_uint_t op, mp_obj_t lhs_in, mp_obj_t rhs_in);
mp_obj_t mp_obj_int_pow3(mp_obj_t base, mp_obj_t exponent, mp_obj_t modulus);
#endif // __MICROPY_INCLUDED_PY_OBJINT_H__