{"action":"created","issue":{"url":"https://api.github.com/repos/Nemo157/hamlet/issues/16","repository_url":"https://api.github.com/repos/Nemo157/hamlet","labels_url":"https://api.github.com/repos/Nemo157/hamlet/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/Nemo157/hamlet/issues/16/comments","events_url":"https://api.github.com/repos/Nemo157/hamlet/issues/16/events","html_url":"https://github.com/Nemo157/hamlet/issues/16","id":147859202,"number":16,"title":"Investigate performance","user":{"login":"Nemo157","id":81079,"avatar_url":"https://avatars.githubusercontent.com/u/81079?v=3","gravatar_id":"","url":"https://api.github.com/users/Nemo157","html_url":"https://github.com/Nemo157","followers_url":"https://api.github.com/users/Nemo157/followers","following_url":"https://api.github.com/users/Nemo157/following{/other_user}","gists_url":"https://api.github.com/users/Nemo157/gists{/gist_id}","starred_url":"https://api.github.com/users/Nemo157/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nemo157/subscriptions","organizations_url":"https://api.github.com/users/Nemo157/orgs","repos_url":"https://api.github.com/users/Nemo157/repos","events_url":"https://api.github.com/users/Nemo157/events{/privacy}","received_events_url":"https://api.github.com/users/Nemo157/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-04-12T20:05:40Z","updated_at":"2016-04-13T06:53:04Z","closed_at":null,"body":"`hamlet` is about 75% slower than `horrorshow` on a very simple hello world benchmark ([hamlet bench code](https://github.com/Nemo157/amleth/blob/master/benches/hamlet.rs), [horrorshow bench code](https://github.com/Nemo157/amleth/blob/master/benches/horrorshow.rs), [my results](https://github.com/Nemo157/amleth/blob/master/bench_results.txt)). There should be no reason for anywhere near this performance difference, at a guess it's from `std::fmt`."},"comment":{"url":"https://api.github.com/repos/Nemo157/hamlet/issues/comments/209259971","html_url":"https://github.com/Nemo157/hamlet/issues/16#issuecomment-209259971","issue_url":"https://api.github.com/repos/Nemo157/hamlet/issues/16","id":209259971,"user":{"login":"critiqjo","id":1436441,"avatar_url":"https://avatars.githubusercontent.com/u/1436441?v=3","gravatar_id":"","url":"https://api.github.com/users/critiqjo","html_url":"https://github.com/critiqjo","followers_url":"https://api.github.com/users/critiqjo/followers","following_url":"https://api.github.com/users/critiqjo/following{/other_user}","gists_url":"https://api.github.com/users/critiqjo/gists{/gist_id}","starred_url":"https://api.github.com/users/critiqjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/critiqjo/subscriptions","organizations_url":"https://api.github.com/users/critiqjo/orgs","repos_url":"https://api.github.com/users/critiqjo/repos","events_url":"https://api.github.com/users/critiqjo/events{/privacy}","received_events_url":"https://api.github.com/users/critiqjo/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T06:53:04Z","updated_at":"2016-04-13T06:53:04Z","body":"I just ran horrorshow benchmarks after removing all inlining from `lib.rs`, `template.rs` and `render.rs`. What was taking `~580ns` went to `~620ns` in mine. That's just 7% improvement.\r\n\r\nAlso, when moving from `write!` to `write_str`, it went from `~1200ns` to `~950ns`. That's still 50% slower than horrorshow.\r\n\r\nAlso, since we're doing benchmarks, I thought I'd test `AttributeList(Vec<Attribute<'a>>)` and there was no difference for either empty attribute list or one with single attribute.\r\n\r\nThe real question is -- how much practical difference can it really make? May be I'm wrong, but the current design looks rather convenient compared to a writer-based design. I ask this because ultimately, these will have to written to an `io` stream -- network or file -- in which case, how would it compare (and _how to_ compare)? I do consider 35% improvement as something not to be overlooked so easily..."}}