{"action":"created","issue":{"url":"https://api.github.com/repos/dirko/pyhacrf/issues/2","labels_url":"https://api.github.com/repos/dirko/pyhacrf/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/dirko/pyhacrf/issues/2/comments","events_url":"https://api.github.com/repos/dirko/pyhacrf/issues/2/events","html_url":"https://github.com/dirko/pyhacrf/issues/2","id":75367111,"number":2,"title":"Speedups","user":{"login":"fgregg","id":536941,"avatar_url":"https://avatars.githubusercontent.com/u/536941?v=3","gravatar_id":"","url":"https://api.github.com/users/fgregg","html_url":"https://github.com/fgregg","followers_url":"https://api.github.com/users/fgregg/followers","following_url":"https://api.github.com/users/fgregg/following{/other_user}","gists_url":"https://api.github.com/users/fgregg/gists{/gist_id}","starred_url":"https://api.github.com/users/fgregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgregg/subscriptions","organizations_url":"https://api.github.com/users/fgregg/orgs","repos_url":"https://api.github.com/users/fgregg/repos","events_url":"https://api.github.com/users/fgregg/events{/privacy}","received_events_url":"https://api.github.com/users/fgregg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dirko","id":965973,"avatar_url":"https://avatars.githubusercontent.com/u/965973?v=3","gravatar_id":"","url":"https://api.github.com/users/dirko","html_url":"https://github.com/dirko","followers_url":"https://api.github.com/users/dirko/followers","following_url":"https://api.github.com/users/dirko/following{/other_user}","gists_url":"https://api.github.com/users/dirko/gists{/gist_id}","starred_url":"https://api.github.com/users/dirko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirko/subscriptions","organizations_url":"https://api.github.com/users/dirko/orgs","repos_url":"https://api.github.com/users/dirko/repos","events_url":"https://api.github.com/users/dirko/events{/privacy}","received_events_url":"https://api.github.com/users/dirko/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-05-11T21:37:50Z","updated_at":"2015-05-12T17:22:40Z","closed_at":null,"body":"With a trained model, pyhacrf is spending all it's time in the `_forward` and `_build_lattice` functions. Are these parts of  the code stable enough for speed optimizations?\r\n\r\n```bash\r\nncalls  tottime  percall  cumtime  percall filename:lineno(function)\r\n     4437    0.535    0.000   51.148    0.012 pyhacrf.py:124(predict_proba)\r\n     4437    0.026    0.000   31.088    0.007 pyhacrf.py:355(predict)\r\n     4437    0.074    0.000   31.020    0.007 pyhacrf.py:360(_forward_probabilities)\r\n     4437   26.067    0.006   30.942    0.007 pyhacrf.py:374(_forward)\r\n     4437    0.111    0.000   19.417    0.004 pyhacrf.py:326(__init__)\r\n     4437   14.329    0.003   19.305    0.004 pyhacrf.py:414(_build_lattice)\r\n  2794029    4.299    0.000    4.299    0.000 {numpy.core._dotblas.dot}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/dirko/pyhacrf/issues/comments/101357175","html_url":"https://github.com/dirko/pyhacrf/issues/2#issuecomment-101357175","issue_url":"https://api.github.com/repos/dirko/pyhacrf/issues/2","id":101357175,"user":{"login":"dirko","id":965973,"avatar_url":"https://avatars.githubusercontent.com/u/965973?v=3","gravatar_id":"","url":"https://api.github.com/users/dirko","html_url":"https://github.com/dirko","followers_url":"https://api.github.com/users/dirko/followers","following_url":"https://api.github.com/users/dirko/following{/other_user}","gists_url":"https://api.github.com/users/dirko/gists{/gist_id}","starred_url":"https://api.github.com/users/dirko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirko/subscriptions","organizations_url":"https://api.github.com/users/dirko/orgs","repos_url":"https://api.github.com/users/dirko/repos","events_url":"https://api.github.com/users/dirko/events{/privacy}","received_events_url":"https://api.github.com/users/dirko/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T17:22:40Z","updated_at":"2015-05-12T17:22:40Z","body":"Agreed.\r\n\r\nI think it might also help a lot to store the lattice in some other data structure - might fit into a numpy array. So instead of a list of tuples there can be 2 dimensional array containing indices in another array.\r\n\r\nWhy is line 408 above commented out?"}}