Skip to content

@inbounds pessimizes closure #30563

Closed
@affans

Description

@affans

Consider the following function. Add @inbounds to this line to trrigger it

function bar()
       x=[2]
       for i in 1:10_000 #Add @inbounds to this line to trrigger it
       (m->2i)(x)
       end
 end

@oxinabox also found the bug is triggered with @sync and @time as well.

Metadata

Metadata

Assignees

Labels

compiler:loweringSyntax lowering (compiler front end, 2nd stage)performanceMust go faster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions