{"action":"created","issue":{"url":"https://api.github.com/repos/json4s/json4s-ast/issues/2","labels_url":"https://api.github.com/repos/json4s/json4s-ast/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/json4s/json4s-ast/issues/2/comments","events_url":"https://api.github.com/repos/json4s/json4s-ast/issues/2/events","html_url":"https://github.com/json4s/json4s-ast/issues/2","id":97027238,"number":2,"title":"reboot - use of @inline","user":{"login":"mdedetrich","id":2337269,"avatar_url":"https://avatars.githubusercontent.com/u/2337269?v=3","gravatar_id":"","url":"https://api.github.com/users/mdedetrich","html_url":"https://github.com/mdedetrich","followers_url":"https://api.github.com/users/mdedetrich/followers","following_url":"https://api.github.com/users/mdedetrich/following{/other_user}","gists_url":"https://api.github.com/users/mdedetrich/gists{/gist_id}","starred_url":"https://api.github.com/users/mdedetrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdedetrich/subscriptions","organizations_url":"https://api.github.com/users/mdedetrich/orgs","repos_url":"https://api.github.com/users/mdedetrich/repos","events_url":"https://api.github.com/users/mdedetrich/events{/privacy}","received_events_url":"https://api.github.com/users/mdedetrich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-24T10:59:51Z","updated_at":"2015-07-24T14:52:51Z","closed_at":null,"body":"@rossabaker Has understandable issues in regards to using `@inline` for the AST, since it makes the API quite brittle (see http://stackoverflow.com/questions/4593710/when-should-i-and-should-i-not-use-scalas-inline-annotation)\r\n\r\nDue to this, I have implemented benchmarks to see if `@inline` is worth it, using https://github.com/scalameter/scalameter (which is a testing framework, that also automatically deals for things like `JVM` warmup). Long story short, `@inline` does provide significant performance improvements, which vary depending on which methods are called.\r\n\r\nAs an example, Method \"D\" in https://github.com/mdedetrich/json4s-ast/blob/reboot/jvm/src/test/scala/InlineTest.scala, `@inline` has a performance increase of 38% (which is huge)\r\n\r\nHere is a Gist of my latest run (you can just run `sbt test` to run the test suite) to provide results for your machine. My one is the most powerful version of Macbook Pro from one year ago, so interested to see results on weaker machines.\r\nhttps://gist.github.com/mdedetrich/86887d2bfa7a3c28e0b9\r\n\r\nAs it stands, my current position is to leave `@inline` in there. It actually makes **more** sense for something like `json-ast`, since it will be updated incredibly rarely, so brittle API breakage isn't an issue for a library that updates for something like once a year.\r\n\r\nWould also be handy to add more tests for less trivial methods, I am sure there are other examples where `@inline` makes a big impact."},"comment":{"url":"https://api.github.com/repos/json4s/json4s-ast/issues/comments/124548866","html_url":"https://github.com/json4s/json4s-ast/issues/2#issuecomment-124548866","issue_url":"https://api.github.com/repos/json4s/json4s-ast/issues/2","id":124548866,"user":{"login":"mdedetrich","id":2337269,"avatar_url":"https://avatars.githubusercontent.com/u/2337269?v=3","gravatar_id":"","url":"https://api.github.com/users/mdedetrich","html_url":"https://github.com/mdedetrich","followers_url":"https://api.github.com/users/mdedetrich/followers","following_url":"https://api.github.com/users/mdedetrich/following{/other_user}","gists_url":"https://api.github.com/users/mdedetrich/gists{/gist_id}","starred_url":"https://api.github.com/users/mdedetrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdedetrich/subscriptions","organizations_url":"https://api.github.com/users/mdedetrich/orgs","repos_url":"https://api.github.com/users/mdedetrich/repos","events_url":"https://api.github.com/users/mdedetrich/events{/privacy}","received_events_url":"https://api.github.com/users/mdedetrich/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T14:52:51Z","updated_at":"2015-07-24T14:52:51Z","body":"Hmm, it seems that due to https://github.com/scalameter/scalameter/issues/143, I can't test how effective the `@inline` is"}}