{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/29865","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/29865/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/29865/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/29865/events","html_url":"https://github.com/dart-lang/sdk/issues/29865","id":235830569,"number":29865,"title":"Creating map literals may be expensive in DDC","user":{"login":"leafpetersen","id":8484504,"avatar_url":"https://avatars1.githubusercontent.com/u/8484504?v=4","gravatar_id":"","url":"https://api.github.com/users/leafpetersen","html_url":"https://github.com/leafpetersen","followers_url":"https://api.github.com/users/leafpetersen/followers","following_url":"https://api.github.com/users/leafpetersen/following{/other_user}","gists_url":"https://api.github.com/users/leafpetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/leafpetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leafpetersen/subscriptions","organizations_url":"https://api.github.com/users/leafpetersen/orgs","repos_url":"https://api.github.com/users/leafpetersen/repos","events_url":"https://api.github.com/users/leafpetersen/events{/privacy}","received_events_url":"https://api.github.com/users/leafpetersen/received_events","type":"User","site_admin":false},"labels":[{"id":417806791,"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-dev-compiler","name":"area-dev-compiler","color":"c7def8","default":false},{"id":616983277,"url":"https://api.github.com/repos/dart-lang/sdk/labels/dev-compiler-performance","name":"dev-compiler-performance","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":{"login":"jmesserly","id":1081711,"avatar_url":"https://avatars2.githubusercontent.com/u/1081711?v=4","gravatar_id":"","url":"https://api.github.com/users/jmesserly","html_url":"https://github.com/jmesserly","followers_url":"https://api.github.com/users/jmesserly/followers","following_url":"https://api.github.com/users/jmesserly/following{/other_user}","gists_url":"https://api.github.com/users/jmesserly/gists{/gist_id}","starred_url":"https://api.github.com/users/jmesserly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmesserly/subscriptions","organizations_url":"https://api.github.com/users/jmesserly/orgs","repos_url":"https://api.github.com/users/jmesserly/repos","events_url":"https://api.github.com/users/jmesserly/events{/privacy}","received_events_url":"https://api.github.com/users/jmesserly/received_events","type":"User","site_admin":false},"assignees":[{"login":"jmesserly","id":1081711,"avatar_url":"https://avatars2.githubusercontent.com/u/1081711?v=4","gravatar_id":"","url":"https://api.github.com/users/jmesserly","html_url":"https://github.com/jmesserly","followers_url":"https://api.github.com/users/jmesserly/followers","following_url":"https://api.github.com/users/jmesserly/following{/other_user}","gists_url":"https://api.github.com/users/jmesserly/gists{/gist_id}","starred_url":"https://api.github.com/users/jmesserly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmesserly/subscriptions","organizations_url":"https://api.github.com/users/jmesserly/orgs","repos_url":"https://api.github.com/users/jmesserly/repos","events_url":"https://api.github.com/users/jmesserly/events{/privacy}","received_events_url":"https://api.github.com/users/jmesserly/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-06-14T10:15:48Z","updated_at":"2017-08-18T00:38:59Z","closed_at":null,"body":"An internal customer had code that was running slowly when creating many map literals.  I don't have data as to whether this code was fast enough in dart2js (the customer reported slowness in dartium as well) but it would be worth verifying that our map literal creation code paths are fast enough.\r\n\r\nThis is especially true for string keyed maps (as was the case in the customers code).  I believe that we represent string maps in an optimized way (essentially as JS objects with the keys as properties), so it may be possible for us to codegen map literals directly as the underlying representation objects if we're not already doing so."},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/323229816","html_url":"https://github.com/dart-lang/sdk/issues/29865#issuecomment-323229816","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/29865","id":323229816,"user":{"login":"jmesserly","id":1081711,"avatar_url":"https://avatars2.githubusercontent.com/u/1081711?v=4","gravatar_id":"","url":"https://api.github.com/users/jmesserly","html_url":"https://github.com/jmesserly","followers_url":"https://api.github.com/users/jmesserly/followers","following_url":"https://api.github.com/users/jmesserly/following{/other_user}","gists_url":"https://api.github.com/users/jmesserly/gists{/gist_id}","starred_url":"https://api.github.com/users/jmesserly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmesserly/subscriptions","organizations_url":"https://api.github.com/users/jmesserly/orgs","repos_url":"https://api.github.com/users/jmesserly/repos","events_url":"https://api.github.com/users/jmesserly/events{/privacy}","received_events_url":"https://api.github.com/users/jmesserly/received_events","type":"User","site_admin":false},"created_at":"2017-08-18T00:38:59Z","updated_at":"2017-08-18T00:38:59Z","body":"I did some digging. JsLinkedHashMap performance is really bad in DDC. There's a ton of low hanging fruit here: by inlining a few helpers, fixing the cells to be a JS object literal (rather than a Dart class w/ reified generic), and skipping covariant generic checks for private members, I was able to get nearly 10x speedup. And there's even more room here, I didn't even try touching issues like having the compiler/runtime class collaborate on the data representation, or other tricks for tracking linked hash map ordering."}}
{"actor":{"display_login":"jmesserly"}}