On Fri, Sep 9, 2016 at 11:00 AM, Thaddy de Koning <tha...@thaddy.co.uk> wrote:
> With the proper optimizations it will probably hard to improve on. > Compile the code with -O4 and -s. That generates the assembler output in a > *.s file. > The compiler is rather good at bitmaniputations. > I am not sure the FreePascal compiler is able to convert the code of the procedure BitsetSet(var Bits; Index: UInt32); PUInt64Array(@Bits)^[Index shr 6] := PUInt64Array(@Bits)^[Index shr 6] or (Int64(1) shl (Index and 63)); into a single instruction: bts [eax], edx
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel