Link to home
Start Free TrialLog in
Avatar of polkadot
polkadot

asked on

Linux faster than Windows?

I'm writting a C++ console application. Basic input output ... with <fstream>

If take the idential code and run it on Linux(RedHat) g++ vs Windows (XP) Visual C++ 2005, which is faster? Why?
Avatar of Morcalavin
Morcalavin
Flag of United States of America image

That's a loaded question.  I mean, you've got more than just the os to deal with.  The type of processor, memory, number of running programs, compiler version, etc will all determine the speed.
Avatar of Arty K
YOU say, which is faster and I say WHY :-)
ASKER CERTIFIED SOLUTION
Avatar of Mysidia
Mysidia
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of _iskywalker_
_iskywalker_

It depends also on the linux system. I would say if you run it on gentoo. with no X no other services,
It would run faster in gentoo (gentoo optimize your Linux to your computer). But for file input output you wont
perceive a difference, since this operation can be done in a i386 in the same manner. It is basically a question if dma is on or not (direct access memory, it means that the harddisk will copy without any processor operation the data on the harddisk into the memory). It depends also with you use a usb disk. In linux you can say dont synchronize, so it will be 1000 times fastr, since it writes on the memory, and only if there is not enough memory or you umount the usb disk the file will be copied to the usb, only then. Windows normally copy at the very moment.