{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/516","labels_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/516/labels{/name}","comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/516/comments","events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/516/events","html_url":"https://github.com/JuliaOpt/JuMP.jl/pull/516","id":99830429,"number":516,"title":"[WIP] Faster iteration for JuMPContainers","user":{"login":"joehuchette","id":1373010,"avatar_url":"https://avatars.githubusercontent.com/u/1373010?v=3","gravatar_id":"","url":"https://api.github.com/users/joehuchette","html_url":"https://github.com/joehuchette","followers_url":"https://api.github.com/users/joehuchette/followers","following_url":"https://api.github.com/users/joehuchette/following{/other_user}","gists_url":"https://api.github.com/users/joehuchette/gists{/gist_id}","starred_url":"https://api.github.com/users/joehuchette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehuchette/subscriptions","organizations_url":"https://api.github.com/users/joehuchette/orgs","repos_url":"https://api.github.com/users/joehuchette/repos","events_url":"https://api.github.com/users/joehuchette/events{/privacy}","received_events_url":"https://api.github.com/users/joehuchette/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-08-08T19:48:53Z","updated_at":"2015-08-09T22:34:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/516","html_url":"https://github.com/JuliaOpt/JuMP.jl/pull/516","diff_url":"https://github.com/JuliaOpt/JuMP.jl/pull/516.diff","patch_url":"https://github.com/JuliaOpt/JuMP.jl/pull/516.patch"},"body":"ref #509, currently iteration for JuMPArrays is very inefficient, since the contract is that iteration returns ``(key..., val)`` for any JuMPContainer. First, this should move to returning ``key=>val`` to mirror changes in Base. \r\n\r\nSecond, I'm wondering if we should just encourage people to use ``vals(d)`` for efficient iteration over the entries. More radically, we could just change iteration to act like ``vals(d)`` and encourage people that want the current behavior to use ``zip(keys(d), vals(d))``."},"comment":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/comments/129257711","html_url":"https://github.com/JuliaOpt/JuMP.jl/pull/516#issuecomment-129257711","issue_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/516","id":129257711,"user":{"login":"joehuchette","id":1373010,"avatar_url":"https://avatars.githubusercontent.com/u/1373010?v=3","gravatar_id":"","url":"https://api.github.com/users/joehuchette","html_url":"https://github.com/joehuchette","followers_url":"https://api.github.com/users/joehuchette/followers","following_url":"https://api.github.com/users/joehuchette/following{/other_user}","gists_url":"https://api.github.com/users/joehuchette/gists{/gist_id}","starred_url":"https://api.github.com/users/joehuchette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehuchette/subscriptions","organizations_url":"https://api.github.com/users/joehuchette/orgs","repos_url":"https://api.github.com/users/joehuchette/repos","events_url":"https://api.github.com/users/joehuchette/events{/privacy}","received_events_url":"https://api.github.com/users/joehuchette/received_events","type":"User","site_admin":false},"created_at":"2015-08-09T22:34:22Z","updated_at":"2015-08-09T22:34:22Z","body":"Just looked, it seems alright. I fixed up a missing method so now ``for _ in x`` and ``for _ in values(x)`` gets the same performance behavior."}}