[fpc-pascal] Re: put data to stdout (fpc vs. gcc)
Michael Van Canneyt
michael at freepascal.org
Fri Jun 15 11:44:55 CEST 2007
On Fri, 15 Jun 2007, Jonas Maebe wrote:
> On 15 jun 2007, at 11:24, fpc at xgelb.de 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 breaks with errors.
> > >What kind of errors?
> >It will break with an error from the library, if the procedure is to slow.
> 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 so?
I think that the problem is the buffering. Just set the text buffer
(settextbuf) to a larger buffer, and it should work a lot faster.
> >Do you know a better way to produce a fast formated output in FreePascal.
> >I would use FreePascal and not gcc, but the fpc result is not practical.
> If your program depends on converting floating point numbers to string
> representation as quickly as possible, I agree that FPC is not the tool you
> want in this case.
I don't see why not ?
What would make it more slow than a comparable routine in libc ?
More information about the fpc-pascal