Open ligurio opened 2 years ago
unreliablefs uses linked list for error injections, see https://github.com/ligurio/unreliablefs/blob/c6a6b1e7136de3ff25dacf2cf785406313a6b39f/unreliablefs_errinj.c#L183-L235 On each operation, it traverses a list with error injections, and it is not optimal from performance point of view, algorithmic complexity is O(N). It is better to use hashmap. For example, a static hashmap implemented by gperf^1.
unreliablefs uses linked list for error injections, see https://github.com/ligurio/unreliablefs/blob/c6a6b1e7136de3ff25dacf2cf785406313a6b39f/unreliablefs_errinj.c#L183-L235 On each operation, it traverses a list with error injections, and it is not optimal from performance point of view, algorithmic complexity is O(N). It is better to use hashmap. For example, a static hashmap implemented by gperf^1.