Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PERFORMANCE] even faster get_turf
#5
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.

At the moment there are no other quick shortcuts to the internal GetLocTurf() function.
Reply


Messages In This Thread
[PERFORMANCE] even faster get_turf - by Erik - 07-03-2016, 12:27 AM
RE: [PERFORMANCE] even faster get_turf - by Erik - 07-03-2016, 11:00 AM
RE: [PERFORMANCE] even faster get_turf - by Erik - 07-14-2016, 03:58 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)