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

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Jun 15 11:53:39 CEST 2007


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 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.

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.

> I don't see why not ?
> What would make it more slow than a comparable routine in libc ?

Of course it is possible to write a routine which is just as fast as  
the one in libc, but I'm not going to spend my time on that (I spent  
months on debugging the current routine on different architectures to  
get consistent and pretty correct output, and there are plenty of  
other more interesting and -as far as I am concerned- important  
things to do).

Currently, FPC's float->string conversion is apparently too slow for  
him however, so FPC is not useful for him at this time if his main  
interest is "speed of converting floating point numbers to string  
representation".


Jonas



More information about the fpc-pascal mailing list