2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 22:05:27 +00:00

Speedup transition table compression. This is a basic improvement and

not an algorithmic improvement.  It does the same basic algorithm of
test until it can insert the data, but instead of only tracking the
first free entry (and recomputing it each pass).  It tracks all
free entries reducing the number of comparisons done and the table
grows in size.

This may actually result in a small loss on small tables, but is a win
for larger tables.
This commit is contained in:
John Johansen
2010-01-27 17:20:13 -08:00
parent f9906a9584
commit 80c7ee74a2
3 changed files with 201 additions and 98 deletions

View File

@@ -210,6 +210,8 @@ static void display_optimize(char *command)
"no-minimize don't do state minimization\n"
"no-hash-part don't hash partitions at start of minimization\n"
"no-remove-unreachable don't do unreachable state removal\n"
"trans-comp-high try to do extra transition table compression\n"
"trans-comp-fast do faster transition table compression\n"
,command);
}
@@ -387,6 +389,10 @@ static int process_args(int argc, char *argv[])
dfaflags &= ~DFA_CONTROL_NO_HASH_PART;
} else if (strcmp(optarg, "no-hash-part") == 0) {
dfaflags |= DFA_CONTROL_NO_HASH_PART;
} else if (strcmp(optarg, "trans-comp-fast") == 0) {
dfaflags &= ~DFA_CONTROL_TRANS_HIGH;
} else if (strcmp(optarg, "trans-comp-high") == 0) {
dfaflags |= DFA_CONTROL_TRANS_HIGH;
} else if (strcmp(optarg, "remove-unreachable") == 0) {
dfaflags &= ~DFA_CONTROL_NO_UNREACHABLE;
} else if (strcmp(optarg, "no-remove-unreachable") == 0) {