[fpc-pascal] Booleans vs sets
ryan at thealchemistguild.com
Fri Sep 22 12:26:06 CEST 2017
Got it, thanks guys.
Btw, how can I know what the size in bytes these 2 options are?
> On Sep 21, 2017, at 4:47 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> On Thu, 21 Sep 2017, Mattias Gaertner wrote:
>> On Thu, 21 Sep 2017 15:16:21 +0700
>> Ryan Joseph <ryan at thealchemistguild.com> wrote:
>>> I have a class that is filling up with booleans. Would it be more efficient to store these as a “set of”? I have 10 bools which is getting up there.
>> Sets need less memory as they are stored as bits.
>> Speed depends on the operations and amount of objects.
>> I would recommend sets.
> Same here.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal