Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-21 Thread Michael Van Canneyt
On Thu, 21 Jun 2007, [EMAIL PROTECTED] wrote: > Hi > > I try your solutions and here are the results: > > 1.) TIP: set text buffer higher (using settextbuf) -> RESULT: procedure > breaks later > 2.) TIP: use flush() after writeln() -> RESULT: procedure breaks on first > flush() > 3.) TIP: co

Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-21 Thread Jonas Maebe
On 21 jun 2007, at 19:12, [EMAIL PROTECTED] wrote: I try your solutions and here are the results: 1.) TIP: set text buffer higher (using settextbuf) -> RESULT: procedure breaks later 2.) TIP: use flush() after writeln() -> RESULT: procedure breaks on first flush() 3.) TIP: convert first fl

[fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-21 Thread fpc
Hi I try your solutions and here are the results: 1.) TIP: set text buffer higher (using settextbuf) -> RESULT: procedure breaks later 2.) TIP: use flush() after writeln() -> RESULT: procedure breaks on first flush() 3.) TIP: convert first float to text and then put it out -> RESULT: the same

[fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-17 Thread L
> I know, programs with a writeln() have lower performance, but > I think, printf() and writeln() must do the same. This need time to > calculate. You have to explain problem more. The key thing to do is find your bottleneck. Write some benchmarks for float to string conversions and put them in

[fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-17 Thread L
> Adrian Wrote: > no - that was not the problem. I have my linux running in a coLinux > > session and it seems that the linker fails, when the file is in a > > windows drive, even as root. other programms don't have problems to read > > or write to this drive. > > > > but there is still a strange

[fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-17 Thread L
Adrian Wrote:> no - that was not the problem. I have my linux running in a coLinux > session and it seems that the linker fails, when the file is in a > windows drive, even as root. other programms don't have problems to read > or write to this drive. > > but there is still a strange problem with

Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-15 Thread Micha Nelissen
Michael Van Canneyt wrote: > You would have to test the speed of each of them separately to be able > to say anything definitive. Like it is now, there is no indication > that it is the float-to-text routine which is to blame. So use sprintf in C, and the equivalent in fpc; and rerun the test. Mi

Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-15 Thread Michael Van Canneyt
On Fri, 15 Jun 2007, Jonas Maebe wrote: > > On 15 jun 2007, at 11:44, Michael Van Canneyt wrote: > > > >I'm sorry, but you are not providing enough information to give any useful > > >comments. There is no reason why a generic library would error out because > > >certain code is "too slow". Is

Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-15 Thread Jonas Maebe
On 15 jun 2007, at 11:53, Jonas Maebe wrote: That's quite unlikely to be the case. settextbuf seldomly makes a difference for me. Especially if you write to standard output, which will trigger a flush after every writeln anyway. (unless you redirect the output to a file, at least under *ni

Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-15 Thread Jonas Maebe
On 15 jun 2007, at 11:44, Michael Van Canneyt wrote: I'm sorry, but you are not providing enough information to give any useful comments. There is no reason why a generic library would error out because certain code is "too slow". Is this a real time application on an embedded system or s

Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-15 Thread Michael Van Canneyt
On Fri, 15 Jun 2007, Jonas Maebe wrote: > > On 15 jun 2007, at 11:24, [EMAIL PROTECTED] wrote: > > >Hi Jonas, > > > > > >I know, programs with a writeln() have lower performance, but I > > > >think, printf() and writeln() must do the same. This need time to > > > >calculate. > > >

Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-15 Thread Jonas Maebe
On 15 jun 2007, at 11:24, [EMAIL PROTECTED] wrote: Hi Jonas, I know, programs with a writeln() have lower performance, but I think, printf() and writeln() must do the same. This need time to calculate. But the difference between printf() and writeln() are so, that the fpc program

[fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-15 Thread fpc
Hi Jonas, >> I know, programs with a writeln() have lower performance, but I think, >> printf() and writeln() must do the same. This need time to calculate. >> But the difference between printf() and writeln() are so, that the fpc >> program breaks with errors. > What kind of errors? I

Re: [fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-14 Thread Jonas Maebe
On 14 jun 2007, at 12:22, [EMAIL PROTECTED] wrote: I know, programs with a writeln() have lower performance, but I think, printf() and writeln() must do the same. This need time to calculate. But the difference between printf() and writeln() are so, that the fpc program breaks wi

[fpc-pascal] Re: put data to stdout (fpc vs. gcc)

2007-06-14 Thread fpc
Hi thank's at all for your help! Here some more Information: 1.) I think, that the inc(counter) procedure is faster then counter:=counter+1;. In the FreePascal book (Free Pascal; M. van Canneyt,F. Klämpfl; C&L; 2000; ISBN 3-932311-67-1; S. 519) you can find this information. 2.) I think,