Solved

Linux faster than Windows?

Posted on 2006-11-02
5
343 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 500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

691 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