I thought this is interesting in light of the recent routing table overload of backbone routers, leading to slow internet connections around the world.
Apparently routers have a special memory called tcam, which is a hardware implementation of an associative array. Routing table entries can be looked up in a single operation, unlike traditional RAM.
It's more complex than that. TCAMs are very expensive (silicon area wise - they use 13 transistors per bit cell) and it's not possible to store entire routing tables in them. Also more IPv6 addresses are present which consume 4x more space than IPv4. All this leads to different scenarios i.e algorithmic TCAMs.
Apparently routers have a special memory called tcam, which is a hardware implementation of an associative array. Routing table entries can be looked up in a single operation, unlike traditional RAM.