stdio performance in tango, stdlib, and perl

Sean Kelly sean at f4.ca
Sat Mar 24 19:55:13 PDT 2007


Andrei Alexandrescu (See Website For Email) wrote:
> Walter Bright wrote:
>>
>> Back in the early days of Windows NT, when multithreaded programming 
>> was introduced to a mass platform, C compilers typically shipped with 
>> two runtime libraries - a single threaded one "for efficiency", and a 
>> multithreaded one. Also, to do multithreaded code, one had to 
>> predefine _MT or throw a command line switch. Inevitably, this was 
>> overlooked, and endless bugs consumed endless time. I made the 
>> decision early on to only ship threadsafe libraries, and have _MT 
>> always on. I've never regretted it, I'm sure it saved me a lot of tech 
>> support time, and avoided the perception that the compiler didn't work 
>> with multithreading.
> 
> MS does the same now if I remember correctly: all of its libraries are 
> MT by default.

Yup.  In fact, I just discovered that Visual Studio 2005 doesn't even 
provide a single-threaded build option any more.  In some ways it's a 
relief because it's allowed me to drop two build options and remove a 
bunch of #if defined(_MT) clauses.

> I agree with Walter's sentiment that Cout(a)(b) is a design mistake. 
> Fortunately, now we have compile-time variadic functions, which will 
> make it easy to correct the design - Cout(a, b) can be made just as good 
> without having to chase typeinfo's at runtime.

Agreed.


Sean



More information about the Digitalmars-d mailing list