{"action":"created","issue":{"url":"https://api.github.com/repos/sphinxteam/Boltzmann.jl/issues/3","labels_url":"https://api.github.com/repos/sphinxteam/Boltzmann.jl/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/sphinxteam/Boltzmann.jl/issues/3/comments","events_url":"https://api.github.com/repos/sphinxteam/Boltzmann.jl/issues/3/events","html_url":"https://github.com/sphinxteam/Boltzmann.jl/issues/3","id":105632159,"number":3,"title":"Efficiency","user":{"login":"eric-tramel","id":1223539,"avatar_url":"https://avatars.githubusercontent.com/u/1223539?v=3","gravatar_id":"","url":"https://api.github.com/users/eric-tramel","html_url":"https://github.com/eric-tramel","followers_url":"https://api.github.com/users/eric-tramel/followers","following_url":"https://api.github.com/users/eric-tramel/following{/other_user}","gists_url":"https://api.github.com/users/eric-tramel/gists{/gist_id}","starred_url":"https://api.github.com/users/eric-tramel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eric-tramel/subscriptions","organizations_url":"https://api.github.com/users/eric-tramel/orgs","repos_url":"https://api.github.com/users/eric-tramel/repos","events_url":"https://api.github.com/users/eric-tramel/events{/privacy}","received_events_url":"https://api.github.com/users/eric-tramel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sphinxteam/Boltzmann.jl/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/sphinxteam/Boltzmann.jl/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/sphinxteam/Boltzmann.jl/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"amanoel","id":1813536,"avatar_url":"https://avatars.githubusercontent.com/u/1813536?v=3","gravatar_id":"","url":"https://api.github.com/users/amanoel","html_url":"https://github.com/amanoel","followers_url":"https://api.github.com/users/amanoel/followers","following_url":"https://api.github.com/users/amanoel/following{/other_user}","gists_url":"https://api.github.com/users/amanoel/gists{/gist_id}","starred_url":"https://api.github.com/users/amanoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amanoel/subscriptions","organizations_url":"https://api.github.com/users/amanoel/orgs","repos_url":"https://api.github.com/users/amanoel/repos","events_url":"https://api.github.com/users/amanoel/events{/privacy}","received_events_url":"https://api.github.com/users/amanoel/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2015-09-09T16:22:34Z","updated_at":"2015-09-11T13:47:40Z","closed_at":null,"body":"It would be nice if some of you speed demons (@amanoel, @alaa-saade) could take a look at the code in `rbm.jl` and make sure that we're computing the RBM training in an efficient way! "},"comment":{"url":"https://api.github.com/repos/sphinxteam/Boltzmann.jl/issues/comments/139551579","html_url":"https://github.com/sphinxteam/Boltzmann.jl/issues/3#issuecomment-139551579","issue_url":"https://api.github.com/repos/sphinxteam/Boltzmann.jl/issues/3","id":139551579,"user":{"login":"eric-tramel","id":1223539,"avatar_url":"https://avatars.githubusercontent.com/u/1223539?v=3","gravatar_id":"","url":"https://api.github.com/users/eric-tramel","html_url":"https://github.com/eric-tramel","followers_url":"https://api.github.com/users/eric-tramel/followers","following_url":"https://api.github.com/users/eric-tramel/following{/other_user}","gists_url":"https://api.github.com/users/eric-tramel/gists{/gist_id}","starred_url":"https://api.github.com/users/eric-tramel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eric-tramel/subscriptions","organizations_url":"https://api.github.com/users/eric-tramel/orgs","repos_url":"https://api.github.com/users/eric-tramel/repos","events_url":"https://api.github.com/users/eric-tramel/events{/privacy}","received_events_url":"https://api.github.com/users/eric-tramel/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T13:47:40Z","updated_at":"2015-09-11T13:47:40Z","body":"I also tried out using the `@simd` approach suggested in [this article](http://julia.readthedocs.org/en/latest/manual/performance-tips/), but I don't think there is any significant difference in performance (on large scale) between it and the `@devec` approach.\r\n\r\nFor reference, I tested the implementation\r\n\r\n```julia\r\nfunction logistic(x::Mat{Float64})\r\n    # SIMD \r\n    s = zeros(x)\r\n    @simd for i=1:length(x)\r\n        @inbounds s[i] = 1 ./ (1 + exp(-x[i]))\r\n    end\r\n\r\n    return s\r\nend\r\n\r\nfunction logistic(x::Vec{Float64})\r\n    # SIMD \r\n    s = zeros(x)\r\n    @simd for i=1:length(x)\r\n        @inbounds s[i] = 1 ./ (1 + exp(-x[i]))\r\n    end\r\n    return s\r\nend\r\n```"}}