Hi Flávio > You can use sets or TBits. Unless you mean packed arrays of byte or > word, etc. In this case you just declare "myvar: packed array of > byte". > > -Flávio
I meant bitpacked arrays of boolean. That's when boolean occupies only one bit in memory. Yes, I can use TBits, but unfortunately for operation that I care about it's not an option. I attached the benchmark with numbers a sequential reading in a loop. All in all TBits performance is really low. Currently it's about 150 times lower than QWord reading (near optimal on my machine) Read from memory Array 1000000 elements Read Byte 0.004380 sek Speed,MB/sec = 217.73 Read Word 0.002950 sek Speed,MB/sec = 646.56 Read DWord 0.004550 sek Speed,MB/sec = 838.40 Read QWord 0.003943 sek Speed,MB/sec = 1934.92 Read bitpacked 0.002745 sek Speed,MB/sec = 43.43 Read TBits 0.009329 sek Speed,MB/sec = 12.78 (!!!) Test program attached. -- Regards, Denis Golovan
testbits.tar.gz
Description: GNU Zip compressed data
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal