[fpc-pascal] bitmask vs sets. Is there a performance difference?
pascaldragon at googlemail.com
Mon Jan 25 16:23:23 CET 2016
Am 25.01.2016 12:36 schrieb "Graeme Geldenhuys" <
mailinglists at geldenhuys.co.uk>:
> On 2016-01-20 23:11, Sven Barth wrote:
> > You cam check this by compiling with -al and comparing the assembler
> It seems using Sets produce slightly smaller assembler code (2
> instructions less) for the example code I posted. Attached is a
> I guess the other benefit is that using Sets is more "pascal like" and
> probably easier for more developers to understand.
In theory the compiler could optimize the non-set code... I don't know
whether the compiler is currently indeed capable of doing so though. Did
you test with different optimization settings?
Anyway I agree that sets are easier to read ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal