[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #7497] Sort lists (pcb, netif, ...) for faster access
From: |
Jonathan Larmour |
Subject: |
[lwip-devel] [task #7497] Sort lists (pcb, netif, ...) for faster access |
Date: |
Thu, 29 Nov 2007 00:49:41 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.0.12) Gecko/20071018 Red Hat/1.5.0.12-0.7.el4 Firefox/1.5.0.12 pango-text |
Follow-up Comment #1, task #7497 (project lwip):
First of all, it appears this is already done for TCP PCBs.
For raw and UDP PCBs, the comparisons in each loop are very expensive (well,
potentially for raw, since who knows what will get done in each callback), so
it is worth doing, even if there were only two in the list!
For netifs, it's less clear as I think most people will have a single netif
(not even loopback), and some may have 2, but infrequently more. The checks on
each iteration are not substantial, so IMHO I say leave it as present, which
is better for the single netif case.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?7497>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/