From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9db882405e08110 X-Google-Attributes: gid103376,public From: Mike Brenner Subject: Re: Large Look-up Table question ? Date: 1999/06/09 Message-ID: <375E80E4.AD795880@mitre.org>#1/1 X-Deja-AN: 487520013 Content-Transfer-Encoding: 7bit References: <375299F4.CDEA8A81@hotmail.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: MITRE Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-06-09T00:00:00+00:00 List-Id: If "static" means that these values are never changing, and if they are character strings, the fastest way to look them up is probably to convert them into a finite state machine and run the machine, if enough random access memory is available for the machine. This was discussed last year in the thread about GOTOs versus table implementation of finite state machines. Nick Wilson wrote: > I'm implementing a large matrix of values which is basically just a big > lookup table. What would be the best way to implement this in only ada83 > code ? My initial idea is to use a static table for all the values but > this seems clunky, can anyone offer some advice ? > > Thanks,