Op Wed, 13 Jun 2007, schreef Catalin Zamfir Alexandru:
> Guess because you're using inc(count) which may tell the compiler to use a
> specific procedure, specific procedure that may have its own hidden
> variables.
>
> Use count := count + 1; and see what happens. This way you're not using th
On 13 jun 2007, at 10:56, [EMAIL PROTECTED] wrote:
The problem: The fpc-based program is explicit slower than the c-
based program.
My questions: Why is it so? Is it possible to avoid the problem?
I guess it's the single to string conversion. This routine is very
complex and not optimized
On 13/06/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi
I wrote two programs one in C and one in Freepascal.
The program read a variable of a library and write it to stdout. I will put it into a file:
("#: ./dataprog > file.dat").
I use "printf" in the C and "writeln" in Freepascal.
Th
Plus, you may have GCC with optimization flags on, due to your Linux system
[for example Gentoo] - whily FPC may be compiling its programs in the normal,
unoptimized way. This also may be a problem. Check it.
On Wednesday 13 June 2007 11:56, [EMAIL PROTECTED] wrote:
> Hi
>
> I wrote two programs
Guess because you're using inc(count) which may tell the compiler to use a
specific procedure, specific procedure that may have its own hidden
variables.
Use count := count + 1; and see what happens. This way you're not using the
inc() procedure that may be specific to the system unit.
On Wedn
Hi
I wrote two programs one in C and one in Freepascal.
The program read a variable of a library and write it to stdout. I will put it
into a file: ("#: ./dataprog > file.dat").
I use "printf" in the C and "writeln" in Freepascal.
The problem: The fpc-based program is explicit slower than the