{"action":"created","issue":{"url":"https://api.github.com/repos/warthog-logic/warthog/issues/16","labels_url":"https://api.github.com/repos/warthog-logic/warthog/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/warthog-logic/warthog/issues/16/comments","events_url":"https://api.github.com/repos/warthog-logic/warthog/issues/16/events","html_url":"https://github.com/warthog-logic/warthog/issues/16","id":55154445,"number":16,"title":"NAryOperator.compactify(Op: String, fs: Formula[L]*) is slow for big Formulas","user":{"login":"MartinWalch","id":1843240,"avatar_url":"https://avatars.githubusercontent.com/u/1843240?v=3","gravatar_id":"","url":"https://api.github.com/users/MartinWalch","html_url":"https://github.com/MartinWalch","followers_url":"https://api.github.com/users/MartinWalch/followers","following_url":"https://api.github.com/users/MartinWalch/following{/other_user}","gists_url":"https://api.github.com/users/MartinWalch/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinWalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinWalch/subscriptions","organizations_url":"https://api.github.com/users/MartinWalch/orgs","repos_url":"https://api.github.com/users/MartinWalch/repos","events_url":"https://api.github.com/users/MartinWalch/events{/privacy}","received_events_url":"https://api.github.com/users/MartinWalch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-22T13:44:57Z","updated_at":"2015-01-22T14:00:05Z","closed_at":null,"body":"The compactify method in org.warthog.generic.formulas.NAryOperator calls reverse twice on the considered List, causing a major performance hit when creating big Formulas."},"comment":{"url":"https://api.github.com/repos/warthog-logic/warthog/issues/comments/71023649","html_url":"https://github.com/warthog-logic/warthog/issues/16#issuecomment-71023649","issue_url":"https://api.github.com/repos/warthog-logic/warthog/issues/16","id":71023649,"user":{"login":"SHildebrandt","id":1681664,"avatar_url":"https://avatars.githubusercontent.com/u/1681664?v=3","gravatar_id":"","url":"https://api.github.com/users/SHildebrandt","html_url":"https://github.com/SHildebrandt","followers_url":"https://api.github.com/users/SHildebrandt/followers","following_url":"https://api.github.com/users/SHildebrandt/following{/other_user}","gists_url":"https://api.github.com/users/SHildebrandt/gists{/gist_id}","starred_url":"https://api.github.com/users/SHildebrandt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SHildebrandt/subscriptions","organizations_url":"https://api.github.com/users/SHildebrandt/orgs","repos_url":"https://api.github.com/users/SHildebrandt/repos","events_url":"https://api.github.com/users/SHildebrandt/events{/privacy}","received_events_url":"https://api.github.com/users/SHildebrandt/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T14:00:05Z","updated_at":"2015-01-22T14:00:05Z","body":"Can you suggest an alternative implementation? I guess replacing the foldLeft with a foldRight (such that you can remove the reverse-calls) won't help, since foldRight will internally use reverse and foldLeft.\r\nI assume that the current implementation is the best we can get unless we take the imperative road."}}