On 13/07/2020 07:51, Alex Henrie wrote:
On Sun, Jul 12, 2020 at 10:12 PM Zebediah Figura z.figura12@gmail.com wrote:
I guess this is a matter of opinion, but I don't think the table is more readable in this form.
I figured the empty entries were worth making getprotobynumber run in constant time. But the table is so small that maybe that doesn't really matter. I'd love to hear some more opinions.
-Alex
You could also use a binary search, since it's sorted (with a comment before it to keep it sorted) which is plenty fast enough, and still keeps the table more readable. Obviously in a separate patch, though.