[fpc-devel] Benchmark for FreePascal
Marc Weustink
marc.weustink at cuperus.nl
Wed Dec 14 18:46:22 CET 2005
Jonas Maebe wrote:
>
> On 14 dec 2005, at 18:33, Marc Weustink wrote:
>
>>> In my test (Mac OS X/PPC, rtl and program compiled with register
>>> variables, text buffer of 64kb) readln's overheid is negligible.
>>> The large cost comes from writeln. The reason the C version is so
>>> much faster is because its output is buffered as well. We
>>> automatically flush the output after each writeln (i.e. after each
>>> writeln of 60 characters), while in C this only happens at the very
>>> end of the program for 128kb of characters at a time.
>>
>>
>> Another speed improvement will be disabling IO checks for write, {$I-}
>
>
> That code only takes 0.5% of the time, not really relevant.
OK, in some other benchmarks I got a (imo) serious ~10-20% speed
improvement by doing so (and all pieces help:)
Marc
More information about the fpc-devel
mailing list