{"action":"created","issue":{"url":"https://api.github.com/repos/cuberite/cuberite/issues/3754","repository_url":"https://api.github.com/repos/cuberite/cuberite","labels_url":"https://api.github.com/repos/cuberite/cuberite/issues/3754/labels{/name}","comments_url":"https://api.github.com/repos/cuberite/cuberite/issues/3754/comments","events_url":"https://api.github.com/repos/cuberite/cuberite/issues/3754/events","html_url":"https://github.com/cuberite/cuberite/pull/3754","id":234634311,"number":3754,"title":"FastRandom rewrite","user":{"login":"peterbell10","id":13238737,"avatar_url":"https://avatars0.githubusercontent.com/u/13238737?v=3","gravatar_id":"","url":"https://api.github.com/users/peterbell10","html_url":"https://github.com/peterbell10","followers_url":"https://api.github.com/users/peterbell10/followers","following_url":"https://api.github.com/users/peterbell10/following{/other_user}","gists_url":"https://api.github.com/users/peterbell10/gists{/gist_id}","starred_url":"https://api.github.com/users/peterbell10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterbell10/subscriptions","organizations_url":"https://api.github.com/users/peterbell10/orgs","repos_url":"https://api.github.com/users/peterbell10/repos","events_url":"https://api.github.com/users/peterbell10/events{/privacy}","received_events_url":"https://api.github.com/users/peterbell10/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-06-08T19:39:04Z","updated_at":"2017-06-14T15:09:46Z","closed_at":"2017-06-13T19:35:31Z","pull_request":{"url":"https://api.github.com/repos/cuberite/cuberite/pulls/3754","html_url":"https://github.com/cuberite/cuberite/pull/3754","diff_url":"https://github.com/cuberite/cuberite/pull/3754.diff","patch_url":"https://github.com/cuberite/cuberite/pull/3754.patch"},"body":"This is mainly motivated by the fact that, despite the name, `cFastRandom` is actually _slower_ than `MTRand`.  Below is the rate the two underlying random engines could produce random outputs using `operator ()` without a distribution (on my machine at least).\r\n\r\n|                      | GCC (GiB/s) | MSVC (GiB/s) |\r\n|---------------|-------------|--------------|\r\n| `minstd_rand` | 1.08        | 0.28         |\r\n| `mt19937`     | 1.57        | 1.21         |\r\n\r\nOf course missing from this is that `mt19937` is more costly to construct.  So this switches from frequently constructed, function local `cFastRandom`s to long lived, thread local `MTRand` instances.\r\n\r\n\r\nAdditionally, differences in the interfaces of these seems to have led to a fair few off by one errors.  So, I've unified and broadened the interfaces of the two random classes into a generic engine wrapper to make them consistent and hopefully a bit simpler to use right."},"comment":{"url":"https://api.github.com/repos/cuberite/cuberite/issues/comments/308462007","html_url":"https://github.com/cuberite/cuberite/pull/3754#issuecomment-308462007","issue_url":"https://api.github.com/repos/cuberite/cuberite/issues/3754","id":308462007,"user":{"login":"mathiascode","id":8754153,"avatar_url":"https://avatars2.githubusercontent.com/u/8754153?v=3","gravatar_id":"","url":"https://api.github.com/users/mathiascode","html_url":"https://github.com/mathiascode","followers_url":"https://api.github.com/users/mathiascode/followers","following_url":"https://api.github.com/users/mathiascode/following{/other_user}","gists_url":"https://api.github.com/users/mathiascode/gists{/gist_id}","starred_url":"https://api.github.com/users/mathiascode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathiascode/subscriptions","organizations_url":"https://api.github.com/users/mathiascode/orgs","repos_url":"https://api.github.com/users/mathiascode/repos","events_url":"https://api.github.com/users/mathiascode/events{/privacy}","received_events_url":"https://api.github.com/users/mathiascode/received_events","type":"User","site_admin":false},"created_at":"2017-06-14T15:09:46Z","updated_at":"2017-06-14T15:09:46Z","body":"FreeBSD builds are failing with the same error. https://cuberite.org/status/"}}
{"actor":{"display_login":"mathiascode"}}