{"action":"created","issue":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/822","repository_url":"https://api.github.com/repos/official-stockfish/Stockfish","labels_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/822/labels{/name}","comments_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/822/comments","events_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/822/events","html_url":"https://github.com/official-stockfish/Stockfish/pull/822","id":181499280,"number":822,"title":"Optimisation of Position::see and Position::see_sign","user":{"login":"atumanian","id":22194068,"avatar_url":"https://avatars.githubusercontent.com/u/22194068?v=3","gravatar_id":"","url":"https://api.github.com/users/atumanian","html_url":"https://github.com/atumanian","followers_url":"https://api.github.com/users/atumanian/followers","following_url":"https://api.github.com/users/atumanian/following{/other_user}","gists_url":"https://api.github.com/users/atumanian/gists{/gist_id}","starred_url":"https://api.github.com/users/atumanian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atumanian/subscriptions","organizations_url":"https://api.github.com/users/atumanian/orgs","repos_url":"https://api.github.com/users/atumanian/repos","events_url":"https://api.github.com/users/atumanian/events{/privacy}","received_events_url":"https://api.github.com/users/atumanian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":29,"created_at":"2016-10-06T19:05:09Z","updated_at":"2016-10-07T18:12:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/pulls/822","html_url":"https://github.com/official-stockfish/Stockfish/pull/822","diff_url":"https://github.com/official-stockfish/Stockfish/pull/822.diff","patch_url":"https://github.com/official-stockfish/Stockfish/pull/822.patch"},"body":"Stèphane's patch removes the only usage of Position::see, where the returned value isn't immediately compared with a value. So I replaced this function by its optimised and more specific version see_ge. This function also supersedes the function Position::see_sign.\r\n\r\nbool Position::see_ge(Move m, Value v) const;\r\n\r\nThis function tests if the SEE of a move is greater or equal than a given value.\r\n\r\nWe use forward iteration on captures instread of backward one, therefore we don't need the swapList array. Also we stop as soon as we have enough information to obtain the result, avoiding unnecessary calls to the min_attacker function.\r\n\r\nSpeed tests (Windows 7), 20 runs for each engine:\r\nTest engine: mean 866648, st. dev. 5964\r\nBase engine: mean 846751, st. dev. 22846\r\nSpeedup: 1.023\r\n\r\nFishtest STC test:\r\nLLR: 2.96 (-2.94,2.94) [0.00,5.00]\r\nTotal: 26040 W: 4675 L: 4442 D: 16923\r\nhttp://tests.stockfishchess.org/tests/view/57f648990ebc59038170fa03\r\n\r\nNo functional change."},"comment":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/comments/252322768","html_url":"https://github.com/official-stockfish/Stockfish/pull/822#issuecomment-252322768","issue_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/822","id":252322768,"user":{"login":"syzygy1","id":3028851,"avatar_url":"https://avatars.githubusercontent.com/u/3028851?v=3","gravatar_id":"","url":"https://api.github.com/users/syzygy1","html_url":"https://github.com/syzygy1","followers_url":"https://api.github.com/users/syzygy1/followers","following_url":"https://api.github.com/users/syzygy1/following{/other_user}","gists_url":"https://api.github.com/users/syzygy1/gists{/gist_id}","starred_url":"https://api.github.com/users/syzygy1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syzygy1/subscriptions","organizations_url":"https://api.github.com/users/syzygy1/orgs","repos_url":"https://api.github.com/users/syzygy1/repos","events_url":"https://api.github.com/users/syzygy1/events{/privacy}","received_events_url":"https://api.github.com/users/syzygy1/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T18:12:50Z","updated_at":"2016-10-07T18:12:50Z","body":"Regarding #823, the \"what\" is already clear from the function's name (pick_best()) and the comment explaining what the function does. Requiring that the implementation of a function hides the function's implementation seems not very useful to me."}}
{"actor":{"display_login":"syzygy1"}}