The complex error function w(z) is defined as e^(-x^2) erfc(-ix). The problem with using w(z) as defined above is that the erfc tends to explode out for larger x (complemented by the exponential going to 0 so everything stays small), so that Mathematica reverts to arbitrary precision calculations that make life VERY slow. The function is used in implementing the voigt profile - a line shape commonly used in spectroscopy and other related areas. Right now I'm reverting to calculating the lineshape once and using an interpolation to speed things up, however this doesn't let me alter the parameters of the lineshape (or fit to them) easily.
scipy has a nice and fast implementation of w(z) as scipy.special.wofz, and I was wondering if there is an equivalent in Mathematica.
SetSystemOptions["CatchMachineUnderflow"->False], which, however, results in getting0. +0. Ifor large arguments. Then I tried defining the function asExp[Log[-z^2+Log@Erfc[-I*z]]], but this turns out to not be any faster than with automatic switching. So, it seems hard to speed this up, except as @Daniel Lichtblau suggests - acl