Hallo
@ Leledumbo: Unfortunately I am a dummy and don't know much about SVN. Exactly only the name...
But now I have source code for you and some prepared test.
First of all: hope I haven't deleted to much (see attachment) to fit the 250kb Boarder.
If so, please look for the whole ZIP at
-- DELETED --
It's my project and I added some batches to make my problem clear.
It's no blind guessing
it was really hard job for my PC and it's a pity that it is so repeatable...
To get an input file, run TEST13.BAT - it create the ERGLOG13.TXT as it should be in my BENCH20 project.
After that you only need the 244.BAT, 262.BAT, 300.BAT and so on - using the version of my QSORT program
compiled with different versions of the FPC compiler.
You can run it - but you don't need - I have already created the outputs: ERGLOG13-alle244.TXT oder ERGLOG13-alle262.TXT
and so on.
The problem now is: With compiler 2.6.2 and up the "slow" version (written to stdout and redirected) ist significant slower
than the "fast" version (output to assigned file). With the 2.4.4 compiler and older there was no such difference.
In the "slow" version I cannot write comments for the progress (because the stdout is redirected and used), but I watched
in real time with my Total Commander
that the problem is in fact at the last matching of files and finally writing by writeln
to stdout. It lasts for about 30 s (at my hardware) where the "fast" only needs 10.
It referes to the line codes 580/581 and 1041/1042 (ruled by the ausok variable). There is nearly no influence of my algorithm
(dynamic buffers or B-Tree which result in the number of files to match last - here for TEST13 five for the dynamic case and 2 for the B-Tree).
@ Thaddy
Also "ShortString" is not the problem - I found out, my compiler uses it as default but I written explicite. I even made the test with long String,
the result was: all versions run up to 150% longer
but the difference between "slow" and "fast" remained equal. It must have another
reason.
I do believe in any switch too - but how to find out? It would help me to see, which switches the FPC (commandline but I can use IDE as well)
uses actually?! Does it show me anywhere?.
Thank You for any good idea