{"action":"created","issue":{"url":"https://api.github.com/repos/composewell/streaming-benchmarks/issues/12","repository_url":"https://api.github.com/repos/composewell/streaming-benchmarks","labels_url":"https://api.github.com/repos/composewell/streaming-benchmarks/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/composewell/streaming-benchmarks/issues/12/comments","events_url":"https://api.github.com/repos/composewell/streaming-benchmarks/issues/12/events","html_url":"https://github.com/composewell/streaming-benchmarks/pull/12","id":342717098,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNTUwNzQw","number":12,"title":"Add composeDropOne benchmark.","user":{"login":"phischu","id":991845,"node_id":"MDQ6VXNlcjk5MTg0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/991845?v=4","gravatar_id":"","url":"https://api.github.com/users/phischu","html_url":"https://github.com/phischu","followers_url":"https://api.github.com/users/phischu/followers","following_url":"https://api.github.com/users/phischu/following{/other_user}","gists_url":"https://api.github.com/users/phischu/gists{/gist_id}","starred_url":"https://api.github.com/users/phischu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phischu/subscriptions","organizations_url":"https://api.github.com/users/phischu/orgs","repos_url":"https://api.github.com/users/phischu/repos","events_url":"https://api.github.com/users/phischu/events{/privacy}","received_events_url":"https://api.github.com/users/phischu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-19T12:58:02Z","updated_at":"2018-07-19T15:48:31Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/composewell/streaming-benchmarks/pulls/12","html_url":"https://github.com/composewell/streaming-benchmarks/pull/12","diff_url":"https://github.com/composewell/streaming-benchmarks/pull/12.diff","patch_url":"https://github.com/composewell/streaming-benchmarks/pull/12.patch"},"body":"I added a benchmark that should demonstrate runtime quadratic in the number of consecutive `drop`s in `streamly`. Since your `Stream` type is recursive and your `drop` function is recursive anyway, I do believe this is fixable, by repeatetly using `uncons`. To my surprise, `vector` has the same \"problem\" and I think it is on purpose to make `drop` non-recursive, to make it fuse."},"comment":{"url":"https://api.github.com/repos/composewell/streaming-benchmarks/issues/comments/406324368","html_url":"https://github.com/composewell/streaming-benchmarks/pull/12#issuecomment-406324368","issue_url":"https://api.github.com/repos/composewell/streaming-benchmarks/issues/12","id":406324368,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjMyNDM2OA==","user":{"login":"harendra-kumar","id":5860491,"node_id":"MDQ6VXNlcjU4NjA0OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/5860491?v=4","gravatar_id":"","url":"https://api.github.com/users/harendra-kumar","html_url":"https://github.com/harendra-kumar","followers_url":"https://api.github.com/users/harendra-kumar/followers","following_url":"https://api.github.com/users/harendra-kumar/following{/other_user}","gists_url":"https://api.github.com/users/harendra-kumar/gists{/gist_id}","starred_url":"https://api.github.com/users/harendra-kumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harendra-kumar/subscriptions","organizations_url":"https://api.github.com/users/harendra-kumar/orgs","repos_url":"https://api.github.com/users/harendra-kumar/repos","events_url":"https://api.github.com/users/harendra-kumar/events{/privacy}","received_events_url":"https://api.github.com/users/harendra-kumar/received_events","type":"User","site_admin":false},"created_at":"2018-07-19T15:48:31Z","updated_at":"2018-07-19T15:48:31Z","author_association":"MEMBER","body":"@phischu bad news! take/takeWhile/drop/dropWhile/scan all show quadratic runtime when composed in both streamly and vector, they both have exactly the same type so I am not surprised that both of them have the same problem, the only difference is that streamly does not use the Skip constructor and relies on join point optimization.  But surprisingly filter operation is not affected.  I had found this same problem earlier in the vector append (cons) operation and could not find a way to fix it, it appeared to me that it is fundamentally unfixable for the vector type. I am not sure about these new discoveries yet but the fact that filter works ok gives some hope. \r\n\r\nIf we cannot fuse, another way could be to use rewrite rules to combine successive take/drop operations. In any case the fallback is the continuation version which composes linearly, but unfortunately it does not optimize well. How can we have the best of both worlds?"}}
{"actor":{"display_login":"harendra-kumar"}}