Re: [fpc-pascal] Set limitations

2025-01-11 Thread Hairy Pixels via fpc-pascal
On Jan 11, 2025 at 10:53:36 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > Set are a minimum of 4 Byte by default cause that's how Delphi does them. > Ifets you want smaller sets then use the $PackSets directive as Martin had > written. > I did not know this existed. I

Re: [fpc-pascal] Set limitations

2025-01-11 Thread Thomas Kurz via fpc-pascal
I always use the one from generics.collections - Original Message - From: Alexey T. via fpc-pascal To: FPC-Pascal users discussions Sent: Saturday, January 11, 2025, 17:32:49 Subject: [fpc-pascal] Set limitations > so it makes more sense > to use a dedicated type instead (e.g. a hash s

Re: [fpc-pascal] Set limitations

2025-01-11 Thread Alexey T. via fpc-pascal
so it makes more sense to use a dedicated type instead (e.g. a hash set or something like that) I found these implementations of hash set (origial is from Java, as search shows): https://wiki.freepascal.org/LGenerics - hashset (unit lgHashSet) - fine-grained concurrent hashset (unit lgHashS

Re: [fpc-pascal] Set limitations

2025-01-11 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Sa., 11. Jan. 2025, 14:17: > I was curious, is there any practical limit on the size of a set (32 bits > and 256 values) and why they couldn’t be 64 bit or any other arbitrary > size? The floor seems to be 4 bytes too but why not allow smaller sizes to > sav

Re: [fpc-pascal] Set limitations

2025-01-11 Thread Martin Frb via fpc-pascal
On 11/01/2025 14:57, Hairy Pixels via fpc-pascal wrote: On Jan 11, 2025 at 8:17:33 PM, Hairy Pixels wrote: I was curious, is there any practical limit on the size of a set (32 bits and 256 values) and why they couldn’t be 64 bit or any other arbitrary size? The floor seems to be 4 bytes too bu

Re: [fpc-pascal] Set limitations

2025-01-11 Thread Hairy Pixels via fpc-pascal
On Jan 11, 2025 at 8:17:33 PM, Hairy Pixels wrote: > I was curious, is there any practical limit on the size of a set (32 bits > and 256 values) and why they couldn’t be 64 bit or any other arbitrary > size? The floor seems to be 4 bytes too but why not allow smaller sizes to > save memory? Perh