stdio performance in tango, stdlib, and perl
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Thu Mar 22 00:19:06 PDT 2007
kris wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>> kris wrote:
>>
>>> Andrei Alexandrescu (See Website For Email) wrote:
>>>
>>>> kris wrote:
>>>
>>> [snip]
>>>
>>>>> Tango should still come out in front, although I have to say that
>>>>> benchmarks don't really tell very much in general i.e. doesn't mean
>>>>> much of anything important whether tango "wins" this or not (IMO)
>>>>
>>>>
>>>>
>>>> Why not?
>>>
>>>
>>> If tango were terribly terribly slow instead, then it would be cause
>>> for concern. If I have some program that needs to run faster I'll
>>> find a way to do just that; another reason why tango.io is fairly
>>> modular
>>
>>
>> That's great, but by and large, the attitude that "this is the simple
>> version; if you want performance, you gotta work for it" is precisely
>> what I don't like about certain languages and APIs. This is, for
>> example, why not everybody really condemns C++ iostreams in spite of
>> them being a pinnacle of counter-performance in any contest, be it
>> beauty, size, or speed. People know that C++ can do fast I/O and are
>> driven by the attitude that you gotta work for it - there's no other way.
>>
>> Just make the clear and simple code fastest. One thing I like about D
>> is that it clearly strives to achieve best performance for
>> simply-written code.
>
> Oh, if there's any implication that Tango ought to be "faster" than it
> is, then I suspect you're being unjust, Andrei. You'll be hard pressed
> to find, for example, some routine that hits the heap where that should
> be avoided. The library was built to avoid such pitfalls
>
> That aside, tango.io appears to be fast enough and simple enough. The
> fastest in this case, even, assuming we do something useful about the CR
> chop, .newline is adjusted, or "\n" is used instead ;)
Oh, but I forgot it's cheating: uses read/write so it's incompatible
with C's stdio, which phobos is.
Andrei
More information about the Digitalmars-d
mailing list