stdio performance in tango, stdlib, and perl
kris
foo at bar.com
Thu Mar 22 11:44:38 PDT 2007
Andrei Alexandrescu (See Website For Email) wrote:
> kris wrote:
>
>> Andrei Alexandrescu (See Website For Email) wrote:
>> [snip]
>>
>>> Oh, but I forgot it's cheating: uses read/write so it's incompatible
>>> with C's stdio, which phobos is.
>>
>>
>> How can it possibly be "cheating" when the code was in place before
>> you contrived this test ;)
>>
>> I think you have to stretch a bit to find some /common/ and truly
>> valid cases where what you refer to is important enough to warrant
>> such attention.
>>
>> If it truly were to become an issue (people actually run into problems
>> with it on a regular basis) then tango.io could be changed to
>> special-case this kind of thing; but at this time we prefer to avoid
>> such things and adhere to the KISS principal instead.
>
>
> "Principle" I guess.
Yep. A thousand pardons for my late night spelling mistake. I'll be sure
to reciprocate in future also, if that would be helpful?
> That sounds great. My opinion in the matter is
> simple - D's stdio use C's FILE*, stdio lib, and all. Moreover, it gives
> the programmer full access to them. It would be only nice, if it does
> not cost too much, to not be gratuitously incompatible with them. That's
> all. If you want to take the other route, you better disable access to
> C's getchar et al.
Yes, thanks for that option. It is certainly one approach that has been
considered before, and a trivial one to implement. We'll probably cross
that bridge when we reach it. It's worth noting, however, that Tango is
focused for usage with D programs; not C
BTW: the use of gratuitous here is wholly out of context; some might
interpret the usage as an implication that Tango is based upon a whim ;)
>
>> FWIW, tango.io could trivially be sped up significantly on this 'test'
>> -- as it stands, the implementation is quite pedestrian in nature ;)
>
>
> The 'test' is not a 'test', it's a test deriving from my attempts to
> find the bottleneck in a real D program.
It's being referred to as a "benchmark" Andrei; I was trying to be
somewhat less political by calling it a 'test'. Many pardons
More information about the Digitalmars-d
mailing list