In the Myths That Refuse to Die: Scalability of Overlay Virtual Networking blog post I wrote “number of MAC addresses has absolutely no impact on the forwarding performance until the MAC hash table overflows”, which happens to be almost true.
As always, the devil is in the details: assuming you dedicate a CPU core (or more of them) to the forwarding process like Intel DPDK or Snabb Switch are doing, a small MAC table might fit into the CPU cache, while a hash lookup done on large MAC table inevitably results in accesses to main memory, which are way slower than reads from CPU cache.
I don’t have any vSwitch results that would corroborate this line of thinking, but engineers doing properly designed tests of hash arrays in scripting languages came to the same conclusion – see Real Measurement Is Hard for details (and enjoy the beauty of the Perl code, which proves that Perl doesn’t have to look like line noise).
If you understood the line noise reference above, you’re way too old. Welcome to the “grumpy old engineers” club ;)
On a slightly tangential note, OVS developers try really hard to implement fast hash table lookups in recent OVS releases – if you like reading Donald Knuth books, you’ll thoroughly enjoy Optimistic Concurrent Cuckoo Hash (HT: highscalability.com – an absolute must-read if you’re interested in any aspect of scalability).