{"action":"closed","issue":{"url":"https://api.github.com/repos/emorynlp/nlp4j/issues/35","repository_url":"https://api.github.com/repos/emorynlp/nlp4j","labels_url":"https://api.github.com/repos/emorynlp/nlp4j/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/emorynlp/nlp4j/issues/35/comments","events_url":"https://api.github.com/repos/emorynlp/nlp4j/issues/35/events","html_url":"https://github.com/emorynlp/nlp4j/issues/35","id":166877477,"number":35,"title":"How to speed up the dependency parser by reworking one method","user":{"login":"benson-basis","id":3358159,"avatar_url":"https://avatars.githubusercontent.com/u/3358159?v=3","gravatar_id":"","url":"https://api.github.com/users/benson-basis","html_url":"https://github.com/benson-basis","followers_url":"https://api.github.com/users/benson-basis/followers","following_url":"https://api.github.com/users/benson-basis/following{/other_user}","gists_url":"https://api.github.com/users/benson-basis/gists{/gist_id}","starred_url":"https://api.github.com/users/benson-basis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benson-basis/subscriptions","organizations_url":"https://api.github.com/users/benson-basis/orgs","repos_url":"https://api.github.com/users/benson-basis/repos","events_url":"https://api.github.com/users/benson-basis/events{/privacy}","received_events_url":"https://api.github.com/users/benson-basis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-21T17:44:10Z","updated_at":"2016-07-21T18:58:34Z","closed_at":"2016-07-21T18:58:34Z","body":"Changing this method in ColumnMajorVector got the time on 10MB of English wikipedia from:\r\n\r\nDecode: 0:04:08.748\r\n\r\nto \r\n\r\nDecode: 0:03:17.926\r\n\r\n```\r\n\t@Override\r\n\tpublic void addScores(SparseVector x, float[] scores)\r\n\t{\r\n\t\tList<SparseItem> itemVector = x.getVector();\r\n\t\tint featureSize = getFeatureSize();\r\n\t\titemVector.stream().filter(p -> p.getIndex() < featureSize)\r\n\t\t\t\t.forEach(p -> {\r\n\t\t\t\t\tint index = p.getIndex() * label_size;\r\n\t\t\t\t\tfor (int i = 0; i < scores.length; i++) {\r\n\t\t\t\t\t\tscores[i] += get(index++) * p.getValue();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}\r\n```"}}
{"actor":{"display_login":"benson-basis"}}