Skip to content

performance regression for Core.Intrinsicts.rem_float in 1.8/1.9 #46467

@lmiq

Description

@lmiq

I noticed this in the use of mod, but it seems that the issue can be tracked down to Core.Intrinsics.rem_float:

On 1.8.0:

julia> @btime Core.Intrinsics.rem_float(x, 1.0) setup=(x=rand())
  7.422 ns (0 allocations: 0 bytes)
0.11718355488076748

On 1.7.3:

julia> @btime Core.Intrinsics.rem_float(x, 1.0) setup=(x=rand())
  2.208 ns (0 allocations: 0 bytes)
0.21209837479215266

This is causing a significant performance regression in a package of mine which uses mod many many times.

system info:

Linux m3g 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

edit: on the nightly build:

julia> @btime Core.Intrinsics.rem_float(x, 1.0) setup=(x=rand())
  7.414 ns (0 allocations: 0 bytes)
0.2578476302582853

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceMust go fasterregressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions