{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/1129","repository_url":"https://api.github.com/repos/aspnet/KestrelHttpServer","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/1129/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/1129/comments","events_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/1129/events","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/1129","id":179849863,"number":1129,"title":"Consider optimizing the use of Vector in MemoryPoolIterator","user":{"login":"mburbea","id":213233,"avatar_url":"https://avatars.githubusercontent.com/u/213233?v=3","gravatar_id":"","url":"https://api.github.com/users/mburbea","html_url":"https://github.com/mburbea","followers_url":"https://api.github.com/users/mburbea/followers","following_url":"https://api.github.com/users/mburbea/following{/other_user}","gists_url":"https://api.github.com/users/mburbea/gists{/gist_id}","starred_url":"https://api.github.com/users/mburbea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mburbea/subscriptions","organizations_url":"https://api.github.com/users/mburbea/orgs","repos_url":"https://api.github.com/users/mburbea/repos","events_url":"https://api.github.com/users/mburbea/events{/privacy}","received_events_url":"https://api.github.com/users/mburbea/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-09-28T18:25:02Z","updated_at":"2016-10-01T02:11:45Z","closed_at":null,"body":"A slew of CoreCLR issues have been opened up in regard to method `Seek()`.\r\nTesting against `Vector<byte>.Zero` is currently slow because of the low quality code generation. Slightly better code is generated if you first convert to `Vector<long>`, but  It is better to simply scan for a non-zero value over the four longs.\r\n\r\nAnother thing to consider is inside `FindFirstEqualByte` maybe using a Debruijn table to find the appropriate byte once you have a long.\r\n```csharp\r\n        static readonly byte[] Debruijn64 =\r\n        {\r\n        0, 0, 0, 7, 0, 4, 7, 5, 3, 0, 2, 4, 0, 7, 1, 5,\r\n        7, 3, 2, 0, 2, 2, 4, 2, 6, 1, 7, 4, 3, 1, 6, 4,\r\n        7, 6, 3, 5, 3, 2, 0, 1, 7, 2, 1, 2, 6, 4, 3, 4,\r\n        6, 5, 3, 1, 7, 1, 6, 4, 5, 3, 1, 6, 5, 6, 5, 5,\r\n        };\r\n        const long DEBRUIJN_SEQ64 = 0x26752B916FC7B0D;\r\n        static int DebruijnFindByte(long v)\r\n        {\r\n            return Debruijn64[((ulong)((v & -v) * DEBRUIJN_SEQ64)) >> 58];\r\n        }\r\n```\r\nThis will perform better than the current quasi-tree search, and this helper will almost certainly inline. Obviously, I'd rather there be a bitscanforward intrinsic.\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/comments/250886493","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/1129#issuecomment-250886493","issue_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/1129","id":250886493,"user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"created_at":"2016-10-01T02:11:45Z","updated_at":"2016-10-01T02:11:45Z","body":"Unrolling causes it not to inline; inlining the function causes it not to inline"}}
{"actor":{"display_login":"benaadams"}}