Speed vs x86 and x64

general questions about Neat Video
Post Reply
jpsdr
Posts: 221
Joined: Mon Aug 11, 2008 7:33 am

Speed vs x86 and x64

Post by jpsdr »

I'm a little surprised by the result i've got using the benchmark test of the 3.1 version.

I've tested the VDub pluggin on the same PC (an i7@980), under Windows XP32 SP3 and under Windows XP64 SP2.

First, noticed that best result is with 6 cores of the 12. Somehow it's doesnt surprise me, as there is only 6 physical cores.

No GPU used, my card is useless for it.
What surprised me is the follwing results (1080p, radius 2) :
x86 : around 5,2 fps
x64 : around 4,8 fps

I assume (but maybe i'm wrong), NV must have some part of the code writting in assembly to optimise speed. x64 mode offers more registers, so assembly optimisation can only be more efficient, and speed can only increase, or at worst stay the same, but decrease ???
NVTeam
Posts: 2745
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Post by NVTeam »

Cannot reproduce that in Win7-64. The 64-bit version is about 1.5-2% faster then the 32-bit one. In your measurement, the 64-bit is 8% slower instead. Perhaps because of the differences between XP32 SP3 and XP64 SP2 environments. Please re-run both tests in XP64 SP2 to exclude that factor.

Thank you,
Vlad
jpsdr
Posts: 221
Joined: Mon Aug 11, 2008 7:33 am

Post by jpsdr »

What the point of doing twice the same test on XP64 ?
....maybe, you mean : Test both x86 and x64 pluggin with XP64 ?

I will... but it's not optimal for 32bits apps, wich are runned on some kind of "virtual mode", if i've understood properly...
NVTeam
Posts: 2745
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Post by NVTeam »

Yes, I meant to run both plug-ins in the same 64-bit OS - for example in XP64 SP2 - to make the execution environment the same.

We have done such a test on several computers here and in all cases, the 64-bit version has been faster. In some cases, 1.5-2% faster, in other - up to 8% faster.

Vlad
jpsdr
Posts: 221
Joined: Mon Aug 11, 2008 7:33 am

Post by jpsdr »

From my point of view, compare speed of apps 32bits and 64bits both under a 64bits OS is irrelevant. From the few i've understood, 32bits apps are run under a virtual 32bits mode/machine on 64bits OS, so, they are obviously slow downed compared to be run under a 32bits OS.
Test of apps must be done under their native environments, otherwise, results have no meaning, they are biased. Don't compare speed of 2 cars, if you've left the hand brake on one.
32 bits apps must be benchmarked under 32bits OS, and 64bits apps must be benchmarked under 64bits OS.

Results :

32 bits pluggin :
XP32 SP3 : Best result with 6 cores, 5,18fps.
XP64 SP2 : Best result with 9 cores, 4,59fps.

64bits pluggin : Best result with 9 cores, 4,67fps.
NVTeam
Posts: 2745
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Post by NVTeam »

jpsdr wrote:32bits apps are run under a virtual 32bits mode/machine on 64bits OS, so, they are obviously slow downed compared to be run under a 32bits OS.
Why? 32-bit mode - yes, but why slower?

For example, Microsoft suggests the opposite:
Microsoft wrote:Instruction emulation is performed on the chip. On the x64 processor, instructions are executed natively by the micro-architecture. Therefore, execution speed under WOW64 on x64 is similar to its speed under 32-bit Windows.
jpsdr wrote:Test of apps must be done under their native environments, otherwise, results have no meaning, they are biased.
That is generally a good idea. But how do you make sure those execution environments (XP32 SP3 and XP64 SP2) are equivalent in terms of efficiency of running applications? One may have a higher overhead than the other, so the same application would run in it slower.
jpsdr wrote:32 bits pluggin :
XP32 SP3 : Best result with 6 cores, 5,18fps.
XP64 SP2 : Best result with 9 cores, 4,59fps.

64bits pluggin : Best result with 9 cores, 4,67fps.
So there are two possible explanations for such results:

1) your explanation: any 32-bit code under 64-bit OS somehow runs slower then under 32-bit OS AND our 64-bit plug-in is for some inexplicable reason slower than the 32-bit one, despite all the benefits of 64-bit registers, etc.;

2) my explanation: that install of XP64 SP2 is a slower (than XP32 SP3) execution environment in general, for any code, 32-bit or 64-bit one.

Which explanation do you prefer?

I prefer the latter one, because it is simpler and explains why both 32-bit and 64-bit plug-ins run slower under XP64, yet the 64-bit plug-in is still 1.7% (which is close to our results) faster than the 32-bit one, which seems generally reasonable given wider 64-bit registers.

Vlad
jpsdr
Posts: 221
Joined: Mon Aug 11, 2008 7:33 am

Post by jpsdr »

Even if i'm not totaly convinced by Microsoft that execution under WOW64 is realy identical as 32-bit Windows, and in fact, they said similar, not exactly identical, i still think they are a little slower.

However, Having 32bits 13% faster (or 64bit 11% slower, as you wich), seems a little high. Even if i still think 32-bit code is a little slower under 64-bits OS, i don't think (at least, i hope !!!!!) it's so huge.

Have you the possibility on your own to check ?
Make the same test of 32bits plugin under a 32bits OS and under a 64bits OS ? On the same PC, of course !

Or maybe someone who read this thread may do this test also ?
I don't have Win7, but if someone has on his PC both Win7x86 and Win7x64 ?

As i'm doing my install in the exact same way, and configure my Windows installations the same way, i don't see any thing wich may explain the speed difference (this doesn't mean there isn't one well hiden), in the two Windows install. Maybe Windows XP64 is simply slower than XP32... :roll:

I'll test with x264. In theory, 64bits x264 code is around 10% faster than 32bits code. I'll check if i can make some tests this WE with x264 to see.

Only 1.7% for 64bits is alway that, but it means that unfortunately the extra registers don't provide great help. There has been some cases on some filters, often ressampling, where the speed improvement was more than 30%. 64bits may give great improvement, but it's not mandatory.
NVTeam
Posts: 2745
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Post by NVTeam »

Direct measurements, all on one machine:
WinXP 32-bit, NV 32-bit: 3.16 fps
Win 7 64-bit, NV 32-bit: 3.19 fps
Win 7 64-bit, NV 64-bit: 3.23 fps

Vlad
jpsdr
Posts: 221
Joined: Mon Aug 11, 2008 7:33 am

Post by jpsdr »

Ok, thanks for these informations.

Unfortunately for me, it seems that there is something with my XP64.

Now, is it only XP64 wich is globaly slower, or is it something very specific on my own.... :?: :(

I'll try Google... :wink:
jpsdr
Posts: 221
Joined: Mon Aug 11, 2008 7:33 am

Post by jpsdr »

I've made some tests with x264, and results are more than i expected :

All tests were made with same video, same parameters, etc... on a 1080p small video of 1000 frames.

x264 dev claims x64 version is globaly 10% faster than x86 version.

Under XP64 SP2
x64 version :
Pass 1 : 12,40fps
Pass 2 : 4,49fps
x86 version :
Pass 1 : 8,9fps
Pass 2 : 3,23fps.

Wich give gain from x86 -> x64
Pass 1 : +39%
Pass 2 : +39%
Ok... a lot more than expected, but ok.

Under XP32 SP3
x86 version :
Pass 1 : 9,00fps
Pass 2 : 3.27fps
Wich give gain from XP64 -> XP32
Pass 1 : +1%
Pass 2 : +1%
These results are totaly different from NV tests.
I consider this some kind of normal behavior, 32bits apps are a little faster on 32bit OS, and a difference of 1% is not something wich will surprise me.

According this, i don't think there is something wich slow down execution on my XP64 installation, i'm more likely to think (but as said, maybe i'm wrong), that it's NV which doesn't truly like :
- Either XP64 globaly.
- Either something specific to my XP64 installation.

It could be interesting to see, if on your own, you can test, on the same PC, 32bits version of NV VDUb pluggin under XP32 SP3 and XP64 SP2, to check if you can reproduce the issue, wich seems more specific to XP64 than 64bits OS generaly.
NVTeam
Posts: 2745
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Post by NVTeam »

Could be something in XP64 in general, could be something specific to your installation of XP64. Sorry, we don't have an XP64 install anymore, otherwise we would run a direct test.
I consider this some kind of normal behavior, 32bits apps are a little faster on 32bit OS
I don't think that is generally right. Our measurements show another results (from the above post):
WinXP 32-bit, NV 32-bit: 3.16 fps
Win 7 64-bit, NV 32-bit: 3.19 fps
I think some OSes are just generally more efficient and spend less CPU resources on housekeeping activities, which allows the user software to do its job faster. It is not about the 32-bit code itself being faster or slower in 32-bit OS (I believe the code itself runs at the same speed as in a 64-bit OS), it is about amount of other work the OS is doing besides running the user application's code.

Anyway, our measurements show that so far the best results on the same CPU are achieved in Win7 64-bit with 64-bit version of NV. We have confirmed that on at least 3 different machines. So if someone is considering an upgrade or a new machine, then Win7 64-bit is a good option.

Vlad
Post Reply