Skip to content
  • Jonas Dreßler's avatar
    function: Only get function name if we actually warn · de24d1bb
    Jonas Dreßler authored
    Getting the function name for logging a warning/error message using
    format_function_name() is expensive and shows up with quite a few
    percent in the profiler.
    
    Luckily, we can completely get rid of that overhead by only getting the
    function name in case we actually have to warn. To do that, check the
    number of arguments ourselves instead of using args.requireAtLeast() and
    then move the call to format_function_name() into the if-conditions of
    those checks.
    de24d1bb