diff --git a/auparse/interpret.c b/auparse/interpret.c index 1c732360b..c5d81f723 100644 --- a/auparse/interpret.c +++ b/auparse/interpret.c @@ -59,6 +59,13 @@ #define FAN_ALLOW 1 #define FAN_DENY 2 #endif + +// This code is at the center of many performance issues. The following +// ensure that it is optimized the most without making all of the audit +// subsystem bigger. +#pragma GCC optimize("O3") +#pragma GCC optimize("-funroll-loops") + #include "auparse-defs.h" #include "gen_tables.h" #include "common.h" diff --git a/lib/lookup_table.c b/lib/lookup_table.c index 1267486bd..ea9984377 100644 --- a/lib/lookup_table.c +++ b/lib/lookup_table.c @@ -30,6 +30,12 @@ #include #include +// This code is at the center of many performance issues. The following +// ensure that it is optimized the most without making all of the audit +// subsystem bigger. +#pragma GCC optimize("O3") +#pragma GCC optimize("-funroll-loops") + #include "libaudit.h" #include "gen_tables.h" #include "private.h"