{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/16305","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/16305/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/16305/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/16305/events","html_url":"https://github.com/JuliaLang/julia/pull/16305","id":154130334,"number":16305,"title":"close #8269: grow arrays incrementally by factors of 1.5 rather than 2","user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/performance","name":"performance","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-10T23:39:36Z","updated_at":"2016-05-11T03:30:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/16305","html_url":"https://github.com/JuliaLang/julia/pull/16305","diff_url":"https://github.com/JuliaLang/julia/pull/16305.diff","patch_url":"https://github.com/JuliaLang/julia/pull/16305.patch"},"body":"As discussed in #8269, many authors seem to consider this to be a good idea.  The patch seems trivial.\r\n\r\nI tried a quick benchmark, and the performance ~~difference was barely measurable (if anything, a 1% slowdown)~~ (whoops, screwed up the patch) was ***3–15% faster*** after this patch.\r\n```jl\r\nfunction grow(n)\r\n    a = Int[]\r\n    for i = 1:n\r\n        push!(a, i)\r\n    end\r\n    return a\r\nend\r\n@time grow(10^8);\r\n```\r\nIt's apparently faster in both theory and practice, and wastes less memory.  Seems worthwhile."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/218352810","html_url":"https://github.com/JuliaLang/julia/pull/16305#issuecomment-218352810","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/16305","id":218352810,"user":{"login":"vchuravy","id":145258,"avatar_url":"https://avatars.githubusercontent.com/u/145258?v=3","gravatar_id":"","url":"https://api.github.com/users/vchuravy","html_url":"https://github.com/vchuravy","followers_url":"https://api.github.com/users/vchuravy/followers","following_url":"https://api.github.com/users/vchuravy/following{/other_user}","gists_url":"https://api.github.com/users/vchuravy/gists{/gist_id}","starred_url":"https://api.github.com/users/vchuravy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vchuravy/subscriptions","organizations_url":"https://api.github.com/users/vchuravy/orgs","repos_url":"https://api.github.com/users/vchuravy/repos","events_url":"https://api.github.com/users/vchuravy/events{/privacy}","received_events_url":"https://api.github.com/users/vchuravy/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T03:30:01Z","updated_at":"2016-05-11T03:30:01Z","body":"I always found that https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md gives a nice reasoning for choosing 1.5"}}