Here is a faster way to multiply BigFloats (it avoids the internal allocation).
function mul!(z::BigFloat, x::BigFloat, y::BigFloat)
ccall(("mpfr_mul",:libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Ref{BigFloat}, Base.MPFR.MPFRRoundingMode), z, x, y, Base.MPFR.ROUNDING_MODE[])
return z
end
mul! (generic function with 1 method)
# or
function mul!(z::BigFloat, x::BigFloat, y::BigFloat)
ccall(("mpfr_mul",:libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Ref{BigFloat}, Base.MPFR.MPFRRoundingMode), z, x, y, Base.MPFR.ROUNDING_MODE[])
return nothing
end
z=BigFloat(); x = BigFloat(pi); y = sqrt(BigFloat(2));
mul!(z, x, y)
z
(about 1.3x faster on a single multiply)