gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ✘nmea.lasttag


From: Fred Wright
Subject: Re: ✘nmea.lasttag
Date: Tue, 7 Apr 2020 17:20:42 -0700 (PDT)
User-agent: Alpine 2.21 (LRH 202 2017-01-01)


On Tue, 7 Apr 2020, Gary E. Miller wrote:
On Tue, 07 Apr 2020 16:29:26 -0700
Hal Murray <address@hidden> wrote:

address@hidden said:
I agree with you that an array will be needed.  But the simple bit
set and test will be gone.  It will have to be some small
functions.

Just use a simple array of bytes.  That will cost a few bytes of
storage but keep the code simple.

Closer to 64 byes more, but whose counting?  And clearing a 72 byte
array is more work than zeroing an integer.

It's not that hard to make it an array of bits. And clearing it is just a matter of memset(). If there's any need to test multiple bits at once, then basing it on 32-bit elements instead of 8-bit elements would make it a bit faster, without complicating anything else.

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]