[fpc-pascal] Booleans vs sets

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Sep 21 11:40:53 CEST 2017


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.

Mattias



More information about the fpc-pascal mailing list