{"action":"created","issue":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Morte-Library/issues/39","repository_url":"https://api.github.com/repos/Gabriel439/Haskell-Morte-Library","labels_url":"https://api.github.com/repos/Gabriel439/Haskell-Morte-Library/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/Gabriel439/Haskell-Morte-Library/issues/39/comments","events_url":"https://api.github.com/repos/Gabriel439/Haskell-Morte-Library/issues/39/events","html_url":"https://github.com/Gabriel439/Haskell-Morte-Library/issues/39","id":135820398,"number":39,"title":"unexpected slowness (non-recursive)","user":{"login":"zraffer","id":8678430,"avatar_url":"https://avatars.githubusercontent.com/u/8678430?v=3","gravatar_id":"","url":"https://api.github.com/users/zraffer","html_url":"https://github.com/zraffer","followers_url":"https://api.github.com/users/zraffer/followers","following_url":"https://api.github.com/users/zraffer/following{/other_user}","gists_url":"https://api.github.com/users/zraffer/gists{/gist_id}","starred_url":"https://api.github.com/users/zraffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zraffer/subscriptions","organizations_url":"https://api.github.com/users/zraffer/orgs","repos_url":"https://api.github.com/users/zraffer/repos","events_url":"https://api.github.com/users/zraffer/events{/privacy}","received_events_url":"https://api.github.com/users/zraffer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-23T18:20:44Z","updated_at":"2016-03-13T03:29:15Z","closed_at":null,"body":"There are files with terms in this directory (to be root) in the commit https://github.com/groupoid/om/tree/ac585365a69d8dcd6c43a31a424486d5718c2522/priv/barbers/Hurkens/lambda (also available as a gist here https://gist.github.com/zraffer/dc90b5d076eda6156277 ), a few of which take a very long time to typecheck and normalize. Especially `ShadowTrans` and `Shadow-MkOk`. The terms do not use recursion and need just a few reductions to normalize. Moreover, usage of this terms in simple expressions (call `id` for example --- file `test/Shadow-MkOk` as well as othes files in that directory) take much more time, so typechecking seems to have exponential time complexity in such cases. Therefore long typechecking time for simple terms makes `morte` unusable for development.\r\n\r\nOlder versions (since 1.1) from hackage were tested producing the same time results.\r\nHowever fully normalized versions of the terms (from `morte` output, at https://github.com/groupoid/om/tree/ac585365a69d8dcd6c43a31a424486d5718c2522/priv/barbers/Hurkens/output ) have got typechecked immediately (no slowness).\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Morte-Library/issues/comments/195862264","html_url":"https://github.com/Gabriel439/Haskell-Morte-Library/issues/39#issuecomment-195862264","issue_url":"https://api.github.com/repos/Gabriel439/Haskell-Morte-Library/issues/39","id":195862264,"user":{"login":"Gabriel439","id":1313787,"avatar_url":"https://avatars.githubusercontent.com/u/1313787?v=3","gravatar_id":"","url":"https://api.github.com/users/Gabriel439","html_url":"https://github.com/Gabriel439","followers_url":"https://api.github.com/users/Gabriel439/followers","following_url":"https://api.github.com/users/Gabriel439/following{/other_user}","gists_url":"https://api.github.com/users/Gabriel439/gists{/gist_id}","starred_url":"https://api.github.com/users/Gabriel439/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gabriel439/subscriptions","organizations_url":"https://api.github.com/users/Gabriel439/orgs","repos_url":"https://api.github.com/users/Gabriel439/repos","events_url":"https://api.github.com/users/Gabriel439/events{/privacy}","received_events_url":"https://api.github.com/users/Gabriel439/received_events","type":"User","site_admin":false},"created_at":"2016-03-13T03:29:15Z","updated_at":"2016-03-13T03:29:15Z","body":"Okay, so the latest commit to add support for caching was not responsible for the slowdown; it had no effect on speed in my test:\r\n\r\n```bash\r\n$ time morte < ShadowTrans # after caching\r\n...\r\nreal\t2m33.028s\r\nuser\t2m32.568s\r\nsys\t0m0.512s\r\n$ time morte < ShadowTrans # before caching\r\n...\r\nreal\t2m32.917s\r\nuser\t2m7.512s\r\nsys\t0m25.488s\r\n```\r\n\r\nI'm now testing whether or not the recent changes to the `Context` type are responsible for the slowdown."}}