Thread (12 messages) 12 messages, 6 authors, 2007-07-30

Re: [RFT] fib_trie: cleanup

From: Robert Olsson <hidden>
Date: 2007-07-26 11:28:31

David Miller writes:
 > From: Stephen Hemminger [off-list ref]
 > Date: Thu, 26 Jul 2007 09:46:48 +0100
 > 
 > > Try this out:
 > >      * replace macro's with inlines
 > >      * get rid of places doing multiple evaluations of NODE_PARENT
 > 
 > No objections from me.
 > 
 > Robert?

 Fine it looks cleaner and compiles... thanks Stephen.

 BTW 
 I think might be possible improve functional/performance parts too. It's the 
 list handling I'm thinking of.

 I've observed that in most cases there is only one leaf_info in the leaf list.
 In 96% of current Internet prefixes in the router I just looked into (below). 
 So optimizing for this case could be an idea. Some variant were the leaf holds
 the leaf_info data direct could be worth testing.

 Cheers.
						--ro


 Main:
        Aver depth:     2.57
        Max depth:      6
        Leaves:         215131
        Internal nodes: 52394
          1: 27662  2: 9982  3: 8510  4: 3625  5: 1684  6: 626  7: 240  8: 64  16: 1
        Pointers: 427924
Null ptrs: 160400
Total size: 7102  kB


ip route list | wc -l 
 224649

215131/224649 = 96%
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help