Is there any significant performance overhead to using debug.profilebegin() and debug.profileend() when MicroProfiler isn’t turned on?
I’m considering liberally adding these into our game but I wasn’t sure if there would be any performance impact. When MicroProfiler is turned off are these function calls essentially no-ops or do they still do some work? If they aren’t no-ops, would you recommend adding in an intermediate function call like:
local PROFILE_MODE = false
...
function addProfilingLabel(label: string)
if not PROFILE_MODE then return end
debug.profilebegin(label)
end