07-03-2016, 12:27 AM
[PERFORMANCE] even faster get_turf
|
07-03-2016, 06:26 AM
I don't know why, but I get the feeling that this would probably break a bunch of things.
I'm probably wrong though.
07-03-2016, 11:00 AM
(07-03-2016, 06:26 AM)Noah Buttes Wrote: I don't know why, but I get the feeling that this would probably break a bunch of things. I've done some basic tests, and i have been unable to find any cases where this would break the normal get_turf behavior, it's just slightly faster.
07-03-2016, 11:34 AM
(07-03-2016, 11:00 AM)ErikHanson Wrote:(07-03-2016, 06:26 AM)Noah Buttes Wrote: I don't know why, but I get the feeling that this would probably break a bunch of things. There doesn't seem to be an answer to the question of whether this is intended behavior in the thread you linked in your patch. It might be a good idea to hold off on implementing this live until we get some form of confirmation.
07-14-2016, 03:58 AM
Giving this a friendly bump as it's been confirmed by Lummox to work just fine.
Quote:get_step(Ref,0) is a really innovative idea; you're right that it's calling an internal routine to get the turf. The downside is, it's also doing a call to LocXYZ() and then XYZLoc() even if there's no direction given, so it's unpacking and then re-packing the coordinates for no reason. (That's two divisions and two multiplications.) However it definitely is stable and intended behavior, so you can rely on this to work. A sanity check for dir 0 would speed this up in that case, but obviously it would just be dead weight on all other get_step() calls. |
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)