{"action":"created","issue":{"url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/135","repository_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl","labels_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/135/comments","events_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/135/events","html_url":"https://github.com/SimonDanisch/FixedSizeArrays.jl/issues/135","id":162926565,"number":135,"title":"Pattern matching on vector slow","user":{"login":"jw3126","id":7261506,"avatar_url":"https://avatars.githubusercontent.com/u/7261506?v=3","gravatar_id":"","url":"https://api.github.com/users/jw3126","html_url":"https://github.com/jw3126","followers_url":"https://api.github.com/users/jw3126/followers","following_url":"https://api.github.com/users/jw3126/following{/other_user}","gists_url":"https://api.github.com/users/jw3126/gists{/gist_id}","starred_url":"https://api.github.com/users/jw3126/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jw3126/subscriptions","organizations_url":"https://api.github.com/users/jw3126/orgs","repos_url":"https://api.github.com/users/jw3126/repos","events_url":"https://api.github.com/users/jw3126/events{/privacy}","received_events_url":"https://api.github.com/users/jw3126/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-29T13:33:43Z","updated_at":"2016-06-29T16:04:17Z","closed_at":null,"body":"Code like x,y = Vec(1,2) is currently slow then expected. This is a pitty since that pattern is so handy.\r\n```\r\nusing FixedSizeArrays\r\nusing BenchmarkTools\r\n\r\nfunction match1(v)\r\n    v1,v2,v3,v4 = v\r\n    v1,v2,v3,v4\r\nend\r\n\r\nfunction match2(v)\r\n    v1,v2,v3,v4 = v._\r\n    v1,v2,v3,v4\r\nend\r\nv = rand(Vec{4,Float64})\r\n@show @benchmark match1($v)\r\n@show @benchmark match2($v)\r\n```\r\n\r\n@benchmark(match1($(Expr(:$, :v)))) = BenchmarkTools.Trial: \r\n  samples:          10000\r\n  evals/sample:     998\r\n  time tolerance:   5.00%\r\n  memory tolerance: 1.00%\r\n  memory estimate:  0.00 bytes\r\n  allocs estimate:  0\r\n  minimum time:     15.00 ns (0.00% GC)\r\n  median time:      15.00 ns (0.00% GC)\r\n  mean time:        15.44 ns (0.00% GC)\r\n  maximum time:     98.00 ns (0.00% GC)\r\n@benchmark(match2($(Expr(:$, :v)))) = BenchmarkTools.Trial: \r\n  samples:          10000\r\n  evals/sample:     1000\r\n  time tolerance:   5.00%\r\n  memory tolerance: 1.00%\r\n  memory estimate:  0.00 bytes\r\n  allocs estimate:  0\r\n  minimum time:     4.00 ns (0.00% GC)\r\n  median time:      4.00 ns (0.00% GC)\r\n  mean time:        4.09 ns (0.00% GC)\r\n  maximum time:     89.00 ns (0.00% GC)\r\n\r\n```\r\nJulia Version 0.4.6-pre+18\r\nCommit 198644a (2016-04-01 03:37 UTC)\r\nPlatform Info:\r\n  System: Linux (x86_64-linux-gnu)\r\n  CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz\r\n  WORD_SIZE: 64\r\n  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)\r\n  LAPACK: libopenblas64_\r\n  LIBM: libopenlibm\r\n  LLVM: libLLVM-3.3\r\n```"},"comment":{"url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/comments/229404304","html_url":"https://github.com/SimonDanisch/FixedSizeArrays.jl/issues/135#issuecomment-229404304","issue_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/135","id":229404304,"user":{"login":"SimonDanisch","id":1010467,"avatar_url":"https://avatars.githubusercontent.com/u/1010467?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonDanisch","html_url":"https://github.com/SimonDanisch","followers_url":"https://api.github.com/users/SimonDanisch/followers","following_url":"https://api.github.com/users/SimonDanisch/following{/other_user}","gists_url":"https://api.github.com/users/SimonDanisch/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonDanisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonDanisch/subscriptions","organizations_url":"https://api.github.com/users/SimonDanisch/orgs","repos_url":"https://api.github.com/users/SimonDanisch/repos","events_url":"https://api.github.com/users/SimonDanisch/events{/privacy}","received_events_url":"https://api.github.com/users/SimonDanisch/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T16:04:17Z","updated_at":"2016-06-29T16:04:17Z","body":"see: https://github.com/SimonDanisch/FixedSizeArrays.jl/pull/136\r\n"}}
{"actor":{"display_login":"SimonDanisch"}}