{"action":"created","issue":{"url":"https://api.github.com/repos/d3athrow/vgstation13/issues/10877","repository_url":"https://api.github.com/repos/d3athrow/vgstation13","labels_url":"https://api.github.com/repos/d3athrow/vgstation13/issues/10877/labels{/name}","comments_url":"https://api.github.com/repos/d3athrow/vgstation13/issues/10877/comments","events_url":"https://api.github.com/repos/d3athrow/vgstation13/issues/10877/events","html_url":"https://github.com/d3athrow/vgstation13/pull/10877","id":163541415,"number":10877,"title":"Local coder makes get_turf() 50+% faster with this one weird trick!","user":{"login":"Exxion","id":9827785,"avatar_url":"https://avatars.githubusercontent.com/u/9827785?v=3","gravatar_id":"","url":"https://api.github.com/users/Exxion","html_url":"https://github.com/Exxion","followers_url":"https://api.github.com/users/Exxion/followers","following_url":"https://api.github.com/users/Exxion/following{/other_user}","gists_url":"https://api.github.com/users/Exxion/gists{/gist_id}","starred_url":"https://api.github.com/users/Exxion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Exxion/subscriptions","organizations_url":"https://api.github.com/users/Exxion/orgs","repos_url":"https://api.github.com/users/Exxion/repos","events_url":"https://api.github.com/users/Exxion/events{/privacy}","received_events_url":"https://api.github.com/users/Exxion/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/d3athrow/vgstation13/labels/Performance","name":"Performance","color":"bfe5bf"},{"url":"https://api.github.com/repos/d3athrow/vgstation13/labels/T-Thanks%20BYOND","name":"T-Thanks BYOND","color":"3333CC"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2016-07-03T00:37:34Z","updated_at":"2016-07-04T15:10:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/d3athrow/vgstation13/pulls/10877","html_url":"https://github.com/d3athrow/vgstation13/pull/10877","diff_url":"https://github.com/d3athrow/vgstation13/pull/10877.diff","patch_url":"https://github.com/d3athrow/vgstation13/pull/10877.patch"},"body":"I'm kind of surprised this worked at all, let alone this well.\r\n\r\n`get_turf()` was already extremely fast, so the actual savings here are admittedly not that great, but it can't hurt\r\n\r\nI tested calling this on an area and a datum and it just returned null and didn't runtime, so apparently `get_step()` has that sanity built in\r\n\r\nItem sitting directly in the turf:\r\n![image](https://cloud.githubusercontent.com/assets/9827785/16543085/b6bda4b8-4092-11e6-99ad-979af63ba1e5.png)\r\n\r\nItem in a box in a bag on a mob in a locker on the turf:\r\n![image](https://cloud.githubusercontent.com/assets/9827785/16543086/c9870f12-4092-11e6-97be-5dfe4d37422b.png)\r\n\r\n~~Note that just calling `get_step(whatever, 0)` is actually measurably faster than calling this proc, so maybe do that in cases where every single ounce of performance matters~~ Never mind, I'm making this into a macro when I get the go-ahead from Lummox\r\n\r\nTested a lot."},"comment":{"url":"https://api.github.com/repos/d3athrow/vgstation13/issues/comments/230311113","html_url":"https://github.com/d3athrow/vgstation13/pull/10877#issuecomment-230311113","issue_url":"https://api.github.com/repos/d3athrow/vgstation13/issues/10877","id":230311113,"user":{"login":"Exxion","id":9827785,"avatar_url":"https://avatars.githubusercontent.com/u/9827785?v=3","gravatar_id":"","url":"https://api.github.com/users/Exxion","html_url":"https://github.com/Exxion","followers_url":"https://api.github.com/users/Exxion/followers","following_url":"https://api.github.com/users/Exxion/following{/other_user}","gists_url":"https://api.github.com/users/Exxion/gists{/gist_id}","starred_url":"https://api.github.com/users/Exxion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Exxion/subscriptions","organizations_url":"https://api.github.com/users/Exxion/orgs","repos_url":"https://api.github.com/users/Exxion/repos","events_url":"https://api.github.com/users/Exxion/events{/privacy}","received_events_url":"https://api.github.com/users/Exxion/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T15:10:52Z","updated_at":"2016-07-04T15:10:52Z","body":"You mean add them?"}}
{"actor":{"display_login":"Exxion"}}