New GitHub issue #96768 from isaacl:<br>

<hr>

<pre>
# Feature or enhancement

`pow()` is much slower than `**`.  This could be a performance trap as the two are supposed to be [equivalent](https://docs.python.org/3/library/functions.html#pow).

# Pitch

```
>>> timeit.timeit("3**3")
0.009507275011856109
>>> timeit.timeit("pow(3, 3)")
0.2119580740109086
```

This is likely because of differences in parsing:
```
>>> print(ast.dump(ast.parse('3**3')))
Module(body=[Expr(value=BinOp(left=Constant(value=3), op=Pow(), right=Constant(value=3)))], type_ignores=[])
>>> print(ast.dump(ast.parse('pow(3, 3)')))
Module(body=[Expr(value=Call(func=Name(id='pow', ctx=Load()), args=[Constant(value=3), Constant(value=3)], keywords=[]))], type_ignores=[])
```

Given `pow()` is a builtin, it's sad to see it runs about 20x slower than `**` which might be avoided for cosmetic reasons.
</pre>

<hr>

<a href="https://github.com/python/cpython/issues/96768">View on GitHub</a>
<p>Labels: type-feature</p>
<p>Assignee: </p>