Wireshark-dev: Re: [Wireshark-dev] Remove hf_ variables

From: Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx>
Date: Mon, 29 Jul 2013 22:42:02 +0200
On Mon, Jul 29, 2013 at 01:25:41PM -0700, Guy Harris wrote:
> 
> On Jul 29, 2013, at 1:12 PM, Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx> wrote:
> 
> > Is anyone attached to hf_ variables? ;)
> > 
> > There's no real need of them, and we can just replace them with
> > header_field_info structure.
> 
> I.e., pass a pointer to the relevant structure, rather than an array index into an internal array that can supply that pointer?

Yes.

> I'm not sure there's a compelling reason (other than the effort involved in converting code) to keep the variables.

Being devil's advocate I think there's no good reason to convert it.
Saving few CPU cycles by not doing:
 - load variable into memory
 - avoid PROTO_REGISTRAR_GET_NTH()

and some cycles on startup + max 2-3 MB less in binary doesn't seems like good deal
against converting 90% of dissectors codebase :)