Apple's libm is very good, which may explain some of this, but my guess is
that LLVM is clever enough to notice calls into the system libm and replace
them with x86 instructions for the same functions. The hardware
implementations are fast but don't always have the same accuracy as
openlibm. Other operating systems don't have nearly as good default libm's
– they are often inaccurate, slow, or both.


On Thu, Apr 17, 2014 at 4:07 PM, John Travers <[email protected]> wrote:

> For a function which contains many calls to exp, sin, cos I got about a 4x
> performance boost by compiling with USE_SYSTEM_LIBM=1. Is this expected?
> Why exactly does Julia bundle and default to using its own libm? For
> consistency and accuracy? I'm on the latest MacBook Pro with a Haswell
> CPU - maybe this is to do with AVX?
>
>

Reply via email to