bridge: Optimize port_lookup() using a hash.
authorBen Pfaff <blp@nicira.com>
Mon, 3 May 2010 20:42:39 +0000 (13:42 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 5 May 2010 21:00:49 +0000 (14:00 -0700)
commit836fad5e1ae4316752150fcdfba9afbf8d5f5801
tree6c753fd1db652f53c9ddd3e4cfa19fc19c0b4ad7
parent4a1ee6ae821f73c877af1548d6db9a0e04ad8eaf
bridge: Optimize port_lookup() using a hash.

Before this commit and the preceding one, with 1000 interfaces strcmp()
took 36% and port_lookup() took 8% of total runtime when reconfiguring
bridges.  With these two commits the percentage is reduced to 3% and 0%,
respectively.
vswitchd/bridge.c