-
Enhancement
-
Resolution: Fixed
-
P4
-
16
-
b17
-
generic
-
generic
share/logging/logTag.cpp executes code during static initialization to set up a sorted array used by LogTag::list_tags to print all tags in a sorted manner (used by -Xlog:logging, for example). We can instead ensure the LogTag type enum is sorted beforehand, and rewrite the sorting logic to an assert checking this invariant.
This removes ~58 000 instructions from being executed on startup, and saves a few bytes.
This removes ~58 000 instructions from being executed on startup, and saves a few bytes.