To expand on this from a programmers perspective, usually at the kernel/network stack level, a "patricia" radix-style trie is used for fast ipv6 lookups.
The benefit of the patricia trie being that if you only have a difference keylength of 8 bits (/120) then the ip lookup only takes 8 steps in a worst-case scenario.
The same concept applies to ipv4 cidr as well, but it is less obvious.
William