Skip to content

@fastmath log is slower #36214

Closed
Closed
@kwdye

Description

@kwdye

I'm finding the fastmath implementation of log() to actually be slower than the non-fastmath version.

julia> lottalogs(x) = log.(x)
julia> lottalogsfast(x) = @fastmath log.(x)
julia> zz = rand(100000);
julia> @btime lottalogs(zz);
  497.300 μs (2 allocations: 781.33 KiB)
julia> @btime lottalogsfast(zz);
  778.857 μs (2 allocations: 781.33 KiB)

This was done on Julia 1.4.2 on an AMD 3900X in Fedora Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mathsMathematical functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions