{"action":"closed","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/11819","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/11819/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11819/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/11819/events","html_url":"https://github.com/JuliaLang/julia/issues/11819","id":90370246,"number":11819,"title":"Performance regression when indexing an 4+ dimensional array","user":{"login":"bfredl","id":1363104,"avatar_url":"https://avatars.githubusercontent.com/u/1363104?v=3","gravatar_id":"","url":"https://api.github.com/users/bfredl","html_url":"https://github.com/bfredl","followers_url":"https://api.github.com/users/bfredl/followers","following_url":"https://api.github.com/users/bfredl/following{/other_user}","gists_url":"https://api.github.com/users/bfredl/gists{/gist_id}","starred_url":"https://api.github.com/users/bfredl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfredl/subscriptions","organizations_url":"https://api.github.com/users/bfredl/orgs","repos_url":"https://api.github.com/users/bfredl/repos","events_url":"https://api.github.com/users/bfredl/events{/privacy}","received_events_url":"https://api.github.com/users/bfredl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/performance","name":"performance","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-23T12:09:21Z","updated_at":"2015-06-23T13:37:09Z","closed_at":"2015-06-23T13:37:09Z","body":"Recently, after updating Julia some time last week or so, I see serious performance regression on some code using 4-dimensional arrays or more (my orginal application code used 6 dimensional arrays)\r\n```\r\nfunction v4test()\r\n    l = 10\r\n    v = zeros(Float64, (l, l, l, l))\r\n    for i4 = 1:l\r\n        for i3 = 1:l\r\n            for i2 = 1:l\r\n                for i1 = 1:l\r\n                    v[i1,i2,i3,i4] = i1*i2\r\n                end\r\n            end\r\n        end\r\n    end\r\n    v\r\nend\r\n@time v4test();\r\n@code_llvm v4test()\r\n```\r\nThe llvm code shows that the `setindex!` isn't statically inlined, rather a dynamic call is done in the innermost loop. No problem on 3 dimensional arrays. I believe this is a different problem than #11787 , as the regression is much bigger (50x than julia 0.3) and only for 4+ dimensional arrays.\r\n\r\nI don't remember the last verison it worked without slowdown,  but it was definitely after the Tuplecalypse."}}