Skip to content

Local coder makes get_turf() 50+% faster with this one weird trick!

Rob Nelson requested to merge pull/10877/speedpower into Bleeding-Edge

Created by: Exxion

I'm kind of surprised this worked at all, let alone this well.

get_turf() was already extremely fast, so the actual savings here are admittedly not that great, but it can't hurt

I 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

Item sitting directly in the turf: image

Item in a box in a bag on a mob in a locker on the turf: image

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

Tested a lot.

Merge request reports