In these micro-benchmarks, math.sqrtmath.sqrt will be slower, because of the slight time it takes to lookup the sqrtsqrt in the math namespace. You can improve it slightly with
from math import sqrt Even then though, running a few variations through timeit, show a slight (4-5%) performance advantage for "x**.5"x**.5
interestinglyInterestingly, doing
import math sqrt = math.sqrt sped it up even more, to within 1% difference in speed, with very little statistical significance.
I will repeat Kibbee, and say that this is probably a premature optimization.