{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1387","repository_url":"https://api.github.com/repos/Microsoft/visualfsharp","labels_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1387/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1387/comments","events_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1387/events","html_url":"https://github.com/Microsoft/visualfsharp/pull/1387","id":168000086,"number":1387,"title":"List.scan/mapi2/map3 algorithm improvements","user":{"login":"liboz","id":13482895,"avatar_url":"https://avatars.githubusercontent.com/u/13482895?v=3","gravatar_id":"","url":"https://api.github.com/users/liboz","html_url":"https://github.com/liboz","followers_url":"https://api.github.com/users/liboz/followers","following_url":"https://api.github.com/users/liboz/following{/other_user}","gists_url":"https://api.github.com/users/liboz/gists{/gist_id}","starred_url":"https://api.github.com/users/liboz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liboz/subscriptions","organizations_url":"https://api.github.com/users/liboz/orgs","repos_url":"https://api.github.com/users/liboz/repos","events_url":"https://api.github.com/users/liboz/events{/privacy}","received_events_url":"https://api.github.com/users/liboz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/visualfsharp/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-28T02:21:48Z","updated_at":"2016-07-28T02:21:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/pulls/1387","html_url":"https://github.com/Microsoft/visualfsharp/pull/1387","diff_url":"https://github.com/Microsoft/visualfsharp/pull/1387.diff","patch_url":"https://github.com/Microsoft/visualfsharp/pull/1387.patch"},"body":"I updated the unit tests for mapi2 and map3 to deal with lists of different sizes and did some various code cleanups by removing semicolons and unnecessary parenthesis.\r\n\r\nGot the benchmarks via BenchmarkDotNet (here's my [script](https://gist.github.com/liboz/718a6477efcc9a9550c24eb8307a9aed)). One thing that was strange is that for map3, and 10000 the median time is significantly slower. I'm not sure why this is. Maybe its a caching issue for my cpu.\r\n\r\n\r\n       Method |   count |              Median |             StdDev |  Gen 0 |  Gen 1 |  Gen 2 | Bytes Allocated/Op |\r\n------------- |-------- |-------------------- |------------------- |------- |------- |------- |------------------- |\r\n         scan |      10 |         304.5794 ns |         23.1709 ns |   0.03 |      - |      - |             350.03 |\r\n map3Original |      10 |         341.7830 ns |         16.8830 ns |   0.04 |      - |      - |             484.78 |\r\n         scan |     100 |       2,101.3446 ns |        146.0541 ns |   0.20 |      - |      - |           2,575.35 |\r\n map3Original |     100 |       2,619.7562 ns |        166.3117 ns |   0.33 |      - |      - |           4,318.09 |\r\n         scan |   10000 |     307,643.1233 ns |     15,477.0630 ns |   9.08 |   5.39 |      - |         299,334.00 |\r\n map3Original |   10000 |     388,304.6069 ns |     17,862.5471 ns |  11.94 |   6.81 |      - |         372,673.40 |\r\n         scan | 1000000 | 209,831,043.4375 ns |  6,353,605.4655 ns | 414.61 | 327.88 | 148.69 |      19,587,572.91 |\r\n map3Original | 1000000 | 315,592,189.5875 ns | 10,503,938.3686 ns | 558.84 | 467.34 | 215.47 |      27,217,987.13 |\r\n\r\n        Method |   count |              Median |             StdDev |  Gen 0 |  Gen 1 |  Gen 2 | Bytes Allocated/Op |\r\n-------------- |-------- |-------------------- |------------------- |------- |------- |------- |------------------- |\r\n         mapi2 |      10 |         469.7160 ns |         26.0642 ns |   0.04 |      - |      - |             536.93 |\r\n mapi2Original |      10 |         530.8673 ns |         26.6073 ns |   0.05 |      - |      - |             648.88 |\r\n         mapi2 |     100 |       3,592.7509 ns |        171.6177 ns |   0.33 |      - |      - |           4,281.19 |\r\n mapi2Original |     100 |       4,060.6522 ns |        151.7855 ns |   0.35 |      - |      - |           4,575.95 |\r\n         mapi2 |   10000 |     500,717.5401 ns |     22,130.9440 ns |  10.33 |   8.93 |      - |         452,556.13 |\r\n mapi2Original |   10000 |     622,561.0294 ns |     35,048.0503 ns |  11.93 |  11.49 |      - |         554,726.80 |\r\n         mapi2 | 1000000 | 326,453,111.0025 ns | 12,013,955.8763 ns | 525.00 | 449.00 | 133.00 |      26,085,124.39 |\r\n mapi2Original | 1000000 | 402,292,171.8100 ns |  9,277,239.0437 ns | 732.97 | 607.10 | 169.44 |      35,716,127.78 |\r\n\r\n\r\n       Method |   count |              Median |             StdDev |    Gen 0 |  Gen 1 |  Gen 2 | Bytes Allocated/Op |\r\n------------- |-------- |-------------------- |------------------- |--------- |------- |------- |------------------- |\r\n         map3 |      10 |         613.4993 ns |         32.6481 ns |     0.06 |      - |      - |             746.24 |\r\n map3Original |      10 |         714.7689 ns |         45.0829 ns |     0.07 |      - |      - |             805.37 |\r\n         map3 |     100 |       4,568.9905 ns |        225.8320 ns |     0.46 |      - |      - |           5,560.82 |\r\n map3Original |     100 |       5,278.0294 ns |        279.9612 ns |     0.61 |      - |      - |           7,363.74 |\r\n         map3 |   10000 |     682,773.1369 ns |     27,336.4413 ns |    12.59 |  12.05 |      - |         548,461.39 |\r\n map3Original |   10000 |     644,494.0281 ns |     31,484.0954 ns |    30.53 |   9.28 |      - |         657,631.84 |\r\n         map3 | 1000000 | 501,848,898.9538 ns | 12,512,666.7946 ns |   777.00 | 692.00 | 171.00 |      36,030,283.15 |\r\n map3Original | 1000000 | 592,864,013.6563 ns | 15,369,761.5252 ns | 1,058.00 | 906.00 | 200.00 |      47,469,251.94 |\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/comments/235782813","html_url":"https://github.com/Microsoft/visualfsharp/pull/1387#issuecomment-235782813","issue_url":"https://api.github.com/repos/Microsoft/visualfsharp/issues/1387","id":235782813,"user":{"login":"msftclas","id":9287708,"avatar_url":"https://avatars.githubusercontent.com/u/9287708?v=3","gravatar_id":"","url":"https://api.github.com/users/msftclas","html_url":"https://github.com/msftclas","followers_url":"https://api.github.com/users/msftclas/followers","following_url":"https://api.github.com/users/msftclas/following{/other_user}","gists_url":"https://api.github.com/users/msftclas/gists{/gist_id}","starred_url":"https://api.github.com/users/msftclas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msftclas/subscriptions","organizations_url":"https://api.github.com/users/msftclas/orgs","repos_url":"https://api.github.com/users/msftclas/repos","events_url":"https://api.github.com/users/msftclas/events{/privacy}","received_events_url":"https://api.github.com/users/msftclas/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T02:21:53Z","updated_at":"2016-07-28T02:21:53Z","body":"Hi __@liboz__, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!\r\n    <span>You've already signed the contribution license agreement. Thanks!</span>\r\n        <p>The agreement was validated by Microsoft and real humans are currently evaluating your PR.</p>\r\n\r\nTTYL, MSBOT;\r\n"}}
{"actor":{"display_login":"msftclas"}}