Article

From:
To:
Philippe Ranger
Subject:
Re: Cardinality of a set
Newsgroup:
borland.public.delphi.objectpascal

Re: Cardinality of a set

Philippe Ranger wrote:
> 
> <<Jacques:
> I know I can count. I want to know if there is a
> BUILT-IN function doing the job for me.
> >>
> 
> There is no built-in function and, like you, I think there should be, just
> as there should be sets beyond 256 elements. Many years ago, I wrote a
> universal bit counter, which follows.

Weren't we just here?  

Your "many years ago" is in full flower. That 'loop' instruction has got to go. Besides, it would seem that wrapping around the best of the "bitsInByte" solutions would be both faster and less cumbersome.
-- Bob Lee High Performance Delphi - http://www.econos.com/optimize/ Updated August 2
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Tue, 26 Nov 2024 09:35:42 UTC
Copyright © 2009-2024
HREF Tools Corp.