{"action":"created","issue":{"url":"https://api.github.com/repos/Samsung/jerryscript/issues/678","labels_url":"https://api.github.com/repos/Samsung/jerryscript/issues/678/labels{/name}","comments_url":"https://api.github.com/repos/Samsung/jerryscript/issues/678/comments","events_url":"https://api.github.com/repos/Samsung/jerryscript/issues/678/events","html_url":"https://github.com/Samsung/jerryscript/pull/678","id":112404681,"number":678,"title":"Use heap allocated buffer instead of char collection in ecma_strings","user":{"login":"dbatyai","id":12066566,"avatar_url":"https://avatars.githubusercontent.com/u/12066566?v=3","gravatar_id":"","url":"https://api.github.com/users/dbatyai","html_url":"https://github.com/dbatyai","followers_url":"https://api.github.com/users/dbatyai/followers","following_url":"https://api.github.com/users/dbatyai/following{/other_user}","gists_url":"https://api.github.com/users/dbatyai/gists{/gist_id}","starred_url":"https://api.github.com/users/dbatyai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbatyai/subscriptions","organizations_url":"https://api.github.com/users/dbatyai/orgs","repos_url":"https://api.github.com/users/dbatyai/repos","events_url":"https://api.github.com/users/dbatyai/events{/privacy}","received_events_url":"https://api.github.com/users/dbatyai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Samsung/jerryscript/labels/enhancement","name":"enhancement","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"egavrin","id":782710,"avatar_url":"https://avatars.githubusercontent.com/u/782710?v=3","gravatar_id":"","url":"https://api.github.com/users/egavrin","html_url":"https://github.com/egavrin","followers_url":"https://api.github.com/users/egavrin/followers","following_url":"https://api.github.com/users/egavrin/following{/other_user}","gists_url":"https://api.github.com/users/egavrin/gists{/gist_id}","starred_url":"https://api.github.com/users/egavrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egavrin/subscriptions","organizations_url":"https://api.github.com/users/egavrin/orgs","repos_url":"https://api.github.com/users/egavrin/repos","events_url":"https://api.github.com/users/egavrin/events{/privacy}","received_events_url":"https://api.github.com/users/egavrin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Samsung/jerryscript/milestones/4","html_url":"https://github.com/Samsung/jerryscript/milestones/Engine%20optimization%20&%20enhancement","labels_url":"https://api.github.com/repos/Samsung/jerryscript/milestones/4/labels","id":1188990,"number":4,"title":"Engine optimization & enhancement","description":"","creator":{"login":"egavrin","id":782710,"avatar_url":"https://avatars.githubusercontent.com/u/782710?v=3","gravatar_id":"","url":"https://api.github.com/users/egavrin","html_url":"https://github.com/egavrin","followers_url":"https://api.github.com/users/egavrin/followers","following_url":"https://api.github.com/users/egavrin/following{/other_user}","gists_url":"https://api.github.com/users/egavrin/gists{/gist_id}","starred_url":"https://api.github.com/users/egavrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egavrin/subscriptions","organizations_url":"https://api.github.com/users/egavrin/orgs","repos_url":"https://api.github.com/users/egavrin/repos","events_url":"https://api.github.com/users/egavrin/events{/privacy}","received_events_url":"https://api.github.com/users/egavrin/received_events","type":"User","site_admin":false},"open_issues":30,"closed_issues":50,"state":"open","created_at":"2015-07-01T13:22:04Z","updated_at":"2015-10-26T14:40:50Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-10-20T16:11:32Z","updated_at":"2015-10-27T16:58:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Samsung/jerryscript/pulls/678","html_url":"https://github.com/Samsung/jerryscript/pull/678","diff_url":"https://github.com/Samsung/jerryscript/pull/678.diff","patch_url":"https://github.com/Samsung/jerryscript/pull/678.patch"},"body":"Remove char collection from ecma_strings, and use a heap buffer instead, where we also store string size and length.\r\n\r\nResults (measured on rpi2):\r\n\r\n                               Benchmark |         RSS<br>(+ is better) |        Perf<br>(+ is better) |\r\n                               --------- |                          --- |                         ---- |\r\n                              3d-cube.js | 136 -> 136  (0) | 3.728 -> 3.71  (0.4828) | \r\n                          3d-raytrace.js | 304 -> 264  (13.1579) | 5.918 -> 5.554  (6.1507) | \r\n                  access-binary-trees.js | 88 -> 92  (-4.545) | 2.72 -> 2.72  (0) |\r\n                      access-fannkuch.js | 52 -> 52  (0) | 10.03 -> 9.94  (0.8973) | \r\n                         access-nbody.js | 68 -> 68  (0) | 4.65 -> 4.63  (0.4301) | \r\n             bitops-3bit-bits-in-byte.js | 40 -> 40  (0) | 3.18 -> 3.13  (1.5723) | \r\n                  bitops-bits-in-byte.js | 40 -> 40  (0) | 4.35 -> 4.36  (-0.23) | \r\n                   bitops-bitwise-and.js | 36 -> 36  (0) | 4.26 -> 4.26  (0) | \r\n                controlflow-recursive.js | 224 -> 224  (0) | 3.23 -> 3.17  (1.8576) | \r\n                           crypto-aes.js | 156 -> 152  (2.5641) | 5.96 -> 5.71  (4.1946) | \r\n                           crypto-md5.js | 216 -> 212  (1.8519) | 33.57 -> 10.53  (68.6327) | \r\n                          crypto-sha1.js | 156 -> 152  (2.5641) | 15.1 -> 5.71  (62.1854) | \r\n                    date-format-xparb.js | 104 -> 96  (7.6923) | 2.03 -> 1.82  (10.3448) | \r\n                          math-cordic.js | 48 -> 48  (0) | 4.25 -> 4.23  (0.4706) | \r\n                    math-partial-sums.js | 40 -> 40  (0) | 2.55 -> 2.5  (1.9608) | \r\n                   math-spectral-norm.js | 52 -> 52  (0) | 3.22 -> 3.18  (1.2422) | \r\n                        string-base64.js | 192 -> 164  (14.5833) | 235.22 -> 38.6  (83.5898) | \r\n                         string-fasta.js | 60 -> 60  (0) | 5.54 -> 4.72  (14.8014) | \r\n                         Geometric mean: |       RSS reduction: 2.2246% |           Speed up: 21.6495% |"},"comment":{"url":"https://api.github.com/repos/Samsung/jerryscript/issues/comments/151568715","html_url":"https://github.com/Samsung/jerryscript/pull/678#issuecomment-151568715","issue_url":"https://api.github.com/repos/Samsung/jerryscript/issues/678","id":151568715,"user":{"login":"dbatyai","id":12066566,"avatar_url":"https://avatars.githubusercontent.com/u/12066566?v=3","gravatar_id":"","url":"https://api.github.com/users/dbatyai","html_url":"https://github.com/dbatyai","followers_url":"https://api.github.com/users/dbatyai/followers","following_url":"https://api.github.com/users/dbatyai/following{/other_user}","gists_url":"https://api.github.com/users/dbatyai/gists{/gist_id}","starred_url":"https://api.github.com/users/dbatyai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbatyai/subscriptions","organizations_url":"https://api.github.com/users/dbatyai/orgs","repos_url":"https://api.github.com/users/dbatyai/repos","events_url":"https://api.github.com/users/dbatyai/events{/privacy}","received_events_url":"https://api.github.com/users/dbatyai/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T16:58:21Z","updated_at":"2015-10-27T16:58:21Z","body":"`unit_number` stored the size of the string, see ecma-helpers-string.cpp:73.\r\nThe actual length, as in number of unicode characters, was not stored previously.\r\nInstead, `ecma_get_chars_collection_length` (ecma-helpers-string.cpp:113) was called every time it was requested."}}