longs where uint64s could be - Mailing list pgsql-hackers

From David Fetter
Subject longs where uint64s could be
Date
Msg-id 20200118004213.GM32763@fetter.org
Whole thread Raw
Responses Re: longs where uint64s could be  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
Folks,

While going over places where I might use compiler intrinsics for
things like ceil(log2(n))) and next power of 2(n), I noticed that a
lot of things that can't be fractional are longs instead of, say,
uint64s. Is this the case for historical reasons, or is there some
more specific utility to expressing as longs things that can only have
non-negative integer values? Did this practice pre-date our
now-required 64-bit integers?

Thanks in advance for any insights into this!

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Decade indication
Next
From: Peter Geoghegan
Date:
Subject: Re: longs where uint64s could be