[fpc-pascal] bitmask vs sets. Is there a performance difference?
Sven Barth
pascaldragon at googlemail.com
Thu Jan 21 00:11:18 CET 2016
Am 20.01.2016 19:26 schrieb "Graeme Geldenhuys" <
mailinglists at geldenhuys.co.uk>:
>
> Is there a performance difference between using bitmask values and sets?
For sets with <= 32 elements it should behave the same if I remember
correctly (I don't know right now though whether it would be 64 elements on
64-bit platforms though). With more elements there will be a penalty as
then helper routines are needed.
You cam check this by compiling with -al and comparing the assembler code.
:)
>
> While we are on the topic of Sets. What is the maximum number of values
> you may have in a set, and does it differ between 32-bit and 64-bit
> platforms?
The maximum is currently 256 and it's the same on both platforms.
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160121/d2d380b4/attachment.html>
More information about the fpc-pascal
mailing list