Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Linux faster than Windows?

Posted on 2006-11-02
5
Medium Priority
?
350 Views
Last Modified: 2013-11-15
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?
0
Comment
Question by:polkadot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 18

Expert Comment

by:Morcalavin
ID: 17862531
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.
0
 
LVL 27

Expert Comment

by:Nopius
ID: 17863883
YOU say, which is faster and I say WHY :-)
0
 
LVL 23

Accepted Solution

by:
Mysidia earned 2000 total points
ID: 17864150
It depends on the code, what compiler you are using, and it depends on how you're running it in Redhat V.S. Windows, i.e. what other programs would be running at the same time.

It might certainly run more quickly on the same hardware under Redhat, with no windowing system online at all, and nothing major running in the background, than running under Windows, where the full GUI and many more background tasks are always operating, if the system memory availability is an issue at all.


All things other than the OS being equal, the execution time should be on the same scale in either OS, for such a simple application; very likely random factors that effect program execution will have a larger effect on any one run (So you would observe runs of the same program on the same configuration that were both slower and faster than the other system).


There are of course speed differences between Windows and Linux; however, nothing in your description has singled out a specific difference as applying to your application.


0
 
LVL 6

Expert Comment

by:_iskywalker_
ID: 17865145
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.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question