On 2020/03/18 17:35, Florian Westphal wrote:
Frank Myhr <fmyhr@xxxxxxxxxxx> wrote:
So now I wonder: why not define every set as dynamic?
Sets that are made static allow kernel to pick a more efficient
representation for the set type.
Thanks, Florian. Good to know.
Would performance and/or memory usage take a significant hit by
[defining all sets dynamic]?
I don't think so, but this will probably depend a lot on the
system in question and on the type of elements stored.
Makes sense, thanks. I suppose efficiency gets progressively worse for
element types with larger possible ranges (# of bits), something like?:
inet_proto < inet_service < mark, ipv4_addr < ether_addr < ipv6_addr
I suppose intervals are more efficient than an equivalent group of
single elements?
Is a concatenation like ipv4_addr . inet_service as efficient as a pure
data type with the same number of bits?
Thanks,
Frank