]> git.ipfire.org Git - thirdparty/bird.git/commit
EAttr normalization rewritten to use bucket sort
authorKaterina Kubecova <katerina.kubecova@nic.cz>
Wed, 20 Nov 2024 15:53:13 +0000 (16:53 +0100)
committerMaria Matejka <mq@ucw.cz>
Thu, 12 Dec 2024 20:02:34 +0000 (21:02 +0100)
commit4af3ee1f2f6506ba7d4caaffc1e4307e101fc177
tree719d9a12431ee29ec74b7bb97fa73662fd20b690
parent6e940c259da80fa8aea6dc1070b8b4cdd5847914
EAttr normalization rewritten to use bucket sort

The EAttr ID space is dense so we can just walk once, sweep the whole
input and go home.

There is a little bit of memory inefficiency in allocating always the
largest possible block, yet it isn't too bad.

There are also unit tests for this.
lib/Makefile
lib/rt-normalize_test.c [new file with mode: 0644]
nest/rt-attr.c