Log in

View Full Version : Going x64 is 25% faster than x86?!?!?


Stereodude
8th May 2011, 17:12
So, I compressed the same source using the exact same x264 settings twice. Once in Windows XP SP3 x86 (32-bit), and once in Windows 7 SP1 x64 using identical hardware and settings.

Under XP I used DGDecNV, AVIsynth 2.58, and x264 (1947). Under Win 7 I used DGDecNV x64, AVIsynth 2.58 x64, and x264 x54 (1947).

I wasn't doing anything fancy with AVIsynth:LoadPlugin("C:\HDTV Tools\DGDecNV\DGDecodeNV.dll")
DGSource("Video_2.dgi")
ConvertToYV12().AssumeFPS(24000,1001)

And my x264 command line isn't anything crazy:x264.exe --bitrate 19150 --preset veryslow --tune film --weightp 1 --bframes 3 --ref 4 --bluray-compat --b-adapt 2 --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 1 --qpfile ____.chp -o NUL ____.AVS
x264.exe --bitrate 19150 --preset veryslow --tune film --weightp 1 --bframes 3 --ref 4 --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --pass 2 --qpfile ____.chp -o ____.264 ____.AVS

The two passes under XP x86 took 1107 minutes to complete. Under Windows 7 x64 the two passes took 830 minutes to complete. That's 25% faster!

I was expecting something along the lines of 10-15% based on what I read, but was surprised to see the level of improvement I did. Is this uncommon or is the improvement greater than the 10-15% most people commonly reference?

CruNcher
9th May 2011, 00:58
As you using a combined framework by how much did each part improved if you say overall 25% and did you compared also the same under Win7 64 using a 32 bit framework as the old one do you see a improvement their too and how much is that ?

So you test both 64/32 bit Frameworks under Win 7 64bit and compare that with the Win XP 32 Bit Framework :)
for higher resolution you also test each step and individual components improvement in your case (Avisynth alone ,Avisynth+DGDecodeNV, and X264. :)

This way you also see how much certain parts improved that are rather Kernel based like IO in your Framework for example (you could also measure this all the time on every test stage and maybe other relevant sensor data, though better is doing that another time again after the first results as Software sensoring can impact system performance also) between XP 32 bit and Win 7 64 bit with 32 bit :). Also be sure to test @ the rather same Power Profile between XP and 7 :). So disabling XPs as well as 7s Eventlog sensoring subsystems on the first run would give even higher resolution.

Stereodude
9th May 2011, 02:08
Since DGDecNV offloads the video decompression to the graphics card, it doesn't seem like that should not have much impact x86 vs. x64 since it definitely wasn't limited by decoder speed. However, it's hard to compare just the encoder without changing DGDecNV & AVIsynth to x64 versions since as far as I know you can't use the x64 version of x264 with a x86 chain of software in front of it.

Lam3rD
9th May 2011, 06:20
I've also noticed big improvement when using "slow" filters (like srestore).

Btw what you're looking for to solve the whole 32bit input / 64bit encoder problem is http://forum.doom9.org/showthread.php?t=144140 :) You can also test the difference in encoding speed x86 vs x64

Stereodude
9th May 2011, 17:58
Btw what you're looking for to solve the whole 32bit input / 64bit encoder problem is http://forum.doom9.org/showthread.php?t=144140 :) You can also test the difference in encoding speed x86 vs x64I can try that too, but how do we know the pipe isn't impacting the speed of the encode? Perhaps AVIsynth x64 isn't really any faster than AVIsynth x86 on a x64 system, but the use of a pipe slows down the x86 version slightly?

There are so many factors at play it's hard to come up with a fair comparison. If you use the x86 versions of the various programs under a x64 OS they're running through WoW64 which may impact their performance negatively as opposed to running them on a x86 OS.

I guess to really answer all the questions, I'd have to run the identical x86 program chain I used in XP x86 under Win 7 x86, as well as running the x86 program chain under Win 7 x64. Then we'd know if WoW64 slows it down (or not) and if Win 7 x86 is faster or slower than Win XP x86.

sneaker_ger
9th May 2011, 23:43
You could skip AviSynth completely by inputting raw video. I made a short test and 64bit was some 15% faster compared to 32bit using the exact same command line and OS.

CruNcher
9th May 2011, 23:50
I guess to really answer all the questions, I'd have to run the identical x86 program chain I used in XP x86 under Win 7 x86, as well as running the x86 program chain under Win 7 x64. Then we'd know if WoW64 slows it down (or not) and if Win 7 x86 is faster or slower than Win XP x86.

Not sure if that's really needed and the overhead between Win 7 64 and its hybrid 32 bit mode shouldn't much impact compared to Win 7 32 bit alone more impacting imho are the base changes under the hood between the Vista/7 and XP Kernel, that impact here :)
Though for excellent results and highest resolution you really have to modify both XP as well as 7 to its lowest idle cycling (trying to disable as much overhead as possible above the kernel) and i never saw any review doing that (though understandable as everyone wants results of the fully functional consumer state + all its overhead like Vista perfectly demonstrated how that impacts user acceptance for the OS).

Stereodude
10th May 2011, 01:48
You could skip AviSynth completely by inputting raw video. I made a short test and 64bit was some 15% faster compared to 32bit using the exact same command line and OS.But how do you know the 32bit version wasn't slowed down by WoW64? :p

(assuming you used a Windows OS for your test)

I guess the moral of the story is using a x64 process flow with the x64 version of x264 under Windows 7 is significantly faster than the equivalent under Windows XP x86. Which component is responsible for which portion of the speed increase isn't exactly certain.

Stereodude
10th May 2011, 01:51
Not sure if that's really needed and the overhead between Win 7 64 and its hybrid 32 bit mode shouldn't much impact compared to Win 7 32 bit alone more impacting imho are the base changes under the hood between the Vista/7 and XP Kernel, that impact here :)For what little it's worth, this review (http://www.testfreaks.com/blog/information/32bit-os-shoot-out-windows-xp-vs-vista-vs-7/) shows Win 7 x86 is only a little faster than XP x86 at x264 encoding.

Stereodude
10th May 2011, 01:59
I suppose I should have mentioned the hardware somewhere in here. It's an i7-2600k @ 4.2gHz with 16GB of DDR3-1600 RAM.

burfadel
10th May 2011, 11:00
x64 versions of programmes should be faster than 32-bit programmes, so I'm not surpised at the result. Actually, I believe if there were full optimisations for x64 like there is for x86 that the benefit may even be greater.