Skip to content

inference failure for Float64 constructor? #36783

@stevengj

Description

@stevengj

This discrepancy doesn't seem right:

julia> x = rand(Float16, 10_000);

julia> @btime sum($Float64, $x);
  776.911 μs (29999 allocations: 468.73 KiB)

julia> @btime sum($(y -> Float64(y)), $x);
  42.417 μs (0 allocations: 0 bytes)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions