Performance overhead of MicroProfiler labels with `debug.profile(begin|end)`

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

Hi!

I’ve not had much experience with the Microprofiler. But I wouldn’t personally expect a tool, that is intended for debugging and checking up on stuff like performance, to take any hard hit on the performance itself.

What is your purpose for having it turned on?

It’s nice to have the labels already there to make it easier to profile and optimize our code in the future when we need to.