Re: Endless endianness annoyance

From: David A Taffs (davidtaf@mdhost.cse.tek.com)
Date: Wed Dec 03 1997 - 18:55:53 EST


   To: Multiple Recipients of <unicode@unicode.org>
   From: Mark Leisher <mleisher@crl.nmsu.edu>
   Date: Wed, 3 Dec 1997 08:22:58 -0800 (PST)
   Subject: Endless endianness annoyance

   ...

   What would you do?

I would code two different versions of the search engine,
or, more accurately, code a single search engine so that
it is parameterized (probably at runtime; perhaps at compile
time) with respect to endianality...

This, in my opinion, would not make the search engine
significantly harder to design and implement.

Another alternative, which is one possible way of implementing
the first, is to combine the byte swapping with the search so
if needed the bytes are swapped as they are being searched (i.e.
just before the search), which requires no additional IO overhead
since they have to be in memory anyway...

Both of these assume you can get your own code inside the data
path of the search engine ... or can select a vendor's search
engine which supplies an endianality parameter!

-- 
regards, dave   (david taffs, dat@pobox.com)   assert (opinions <= mine);



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:38 EDT