stdio performance in tango, stdlib, and perl
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Thu Mar 22 14:42:50 PDT 2007
Lars Ivar Igesund wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>
>> I've ran a couple of simple tests comparing Perl, D's stdlib (the coming
>> release), and Tango.
>
> I have uploaded a snapshot with prebuilt libraries to
>
> http://larsivi.net/files/tango-SNAPSHOT-20070322.tar.gz
>
> The prebuilt libraries are in the lib/ folder. Install libphobos.a as usual,
> and add libtango.a to your compile command. The test program (io.d below)
> should be compiled using the line
>
> dmd -O -release -inline io.d libtango.a
>
> io.d
> -------
>
> import tango.io.Console;
>
> void main() {
> char[] line;
> // true means that newlines are retained
> while (Cin.nextLine(line, true))
> Cout(line);
> }
>
> --------
5.0s tcat
Neat! Now that we got the performance problem out of the way, let's
discuss stdio compatibility. I suggest you use getline on GNU platforms.
Andrei
More information about the Digitalmars-d
mailing list