Why is msvcrt (very very) slow?

I ask about old msvcrt.dll . Has Microsoft updated this library in newer versions of windows? or is it the exact same library that can be found on Windows 98 distributions?

I tested msvcrt against Cygwin with a test program that many times calls malloc single list block line with mutexes and semaphores. In ifdef s, a program can be compiled to use Posix functions, as well as to call Windows APIs. When compiling MinGW with WinAPI calls, the only dependency it has is kernel32.dll , ntdll.dll and msvcrt.dll , while when compiling Cygwin with Posix functions, the program will depend on cygwin1.dll .

At first, I simply assumed that the Cygwin version would run slower due to an additional emulation level for Posix functions; he should translate them to WinAPI calls. But it seems that it works 4 times faster on my machine than the compiled MinGW native binary.

The Cygwin documentation says that it uses another libc called newlib, and of course the compiled Cygwin binary seems to be independent of msvcrt. So does that make a huge difference in speed?

I also experienced so much so that when a C program calls millions of malloc s, the msvcrt.dll dependent will work many times slower than any other, depending on the newer msvcrXX.dll . They even ran slower than the same Linux program.

What happened with msvcrt.dll ? Should I avoid it whenever possible?

+1
c windows cygwin libc msvcrt
Apr 29 '15 at 20:37
source share

No one has answered this question yet.

See similar questions:

59
Keyboard polling (keystroke detection) in python

or similar:

2847
Improve SQLite performance per second per second?
2116
Why are stigment additions much faster in individual cycles than in a combined cycle?
1507
With arrays, why is this so, [5] == 5 [a]?
8
GNU GNU Compiler Set without External Dependencies
6
How to run a PE image without a link to kernel32.dll and ntdll.dll
5
Running cygwin built exe on windows without cygwin environment
5
When to use Cygwin or MinGW to compile C code?
2
Hello World with direct system calls under Windows. Without ntdll.dll, kernel32.dll, ... Any solution?
0
mqtt mosquitto windows xp cygwin1
0
Use your own msvcrt.dll instead of system32 alone



All Articles