Quote:
Originally Posted by nabilchampion That means i compiled a small test application in Windows and then executed it first on Windows (XP) platform and noted the time. And then I executed the sane Windows exe on the Linux with WINE.
This test application took 7.5 to 8 Seconds in Windows while to my wonder the same exe took 5 to 6 seconds on the average at Linux with WINE. Also more to my wonder is that I am running OpenSuSE 10.3 at VMware with the Windows XP as a host.
I am very suspicious about this. |
Don't worry about it. The first thing to keep in mind is that WINE is not an emulator. It's essentially an application interface which looks like Windows to the application. There's no reason why the application should run any faster or slower than Windows. What IS different is the code behind the application interface. That's where speed differences may lie. Some of it may be more efficient in Windows. Some of it may be more efficient in WINE.
With a difference of just a couple seconds, it's a bit hard to guess exactly what's going on. It might be something as mundane as a virus scanner checking to make sure the newly created file doesn't have a virus on it (you'd have a virus scanner running in Windows, but not WINE). Or it could be that OpenSUSE has more efficient file system I/O.
I disagree with the previous opinion, though...the VMWare OpenSUSE would definitely have MORE software layers going on. You've got a virtual disc residing on an NTFS partition, which OpenSUSE thinks is a "real" disc with an ext3 partition. So, your application sends write commands to OpenSUSE, which then hits the virtual disc that VMWare handles, and then ultimately VMWare writes those changes to the virtual NTFS disc via Windows's file system I/O.
Note that the last step actually uses Windows's own file system I/O. So theoretically, there's no way the file system I/O could be faster, right? Except...it's not as simple as all those layers acting byte for byte. Modern file system I/O is buffered, so "chunks" of data get moved around instead of doing everything byte-by-byte. Disk writes never occur immediately, which is obvious whenever you run into the "Windows Delayed Write Failed" error.
So, your program will complete before the data is all written to the disc. OpenSUSE might think the data has finished writing while in reality VMWare hasn't flushed all of the differences to Windows yet (and Windows has delayed write as well).
With a difference of only a few seconds, it's hard to say whether there is actually any performance difference in your programs, or if it's just some differences in how "delayed writes" are being handled.