It turned out that MS also lie about Visual 2010 64 bit

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

It turned out that MS also lie about Visual 2010 64 bit

Postby Julio Jerez » Tue Aug 14, 2012 11:05 am

a while back I asked on MS why the mislead the people say that tha visual studio 2010 was uing condinal move to predicate instructions like

int x = a > 0 : 1 : -1

like the sugested here
http://blogs.msdn.com/b/vcblog/archive/2009/11/02/visual-c-code-generation-in-visual-studio-2010.aspx
The resspond was the the new optimization only apply to 64 bit targets. so I took then at thier word and never verified.
now I am consiring removing some of the SindD code in the engine because I am trying to move to OpenCL, and let the compiler optimizar the code CPU code.
before I do that, I was looking at teh code generated by 64 bit target and this is what it does.

Code: Select all
// dgVector q ((dirNeg[0] > dgFloat32 (0.0f)) ? box[1][0] : box[0][0], (dirNeg[1] > dgFloat32 (0.0f)) ? box[1][1] : box[0][1], (dirNeg[2] > dgFloat32 (0.0f)) ? box[1][2] : box[0][2], dgFloat32 (0.0f));
0000000140071D17  comiss      xmm0,xmm10 
0000000140071D1B  mulss       xmm1,xmm11 
0000000140071D20  jbe         0000000140071D28 
0000000140071D22  movaps      xmm3,xmm14 
0000000140071D26  jmp         0000000140071D2C 
0000000140071D28  movaps      xmm3,xmm9 
0000000140071D2C  comiss      xmm1,xmm10 
0000000140071D30  jbe         0000000140071D38 
0000000140071D32  movaps      xmm1,xmm13 
0000000140071D36  jmp         0000000140071D3C 
0000000140071D38  movaps      xmm1,xmm8 
0000000140071D3C  comiss      xmm2,xmm10 
0000000140071D40  jbe         0000000140071D48 
0000000140071D42  movaps      xmm2,xmm12 
0000000140071D46  jmp         0000000140071D4C 
0000000140071D48  movaps      xmm2,xmm15 


the code about is the most atticius pice of code I has ever seen, It has beinh ove 17 years since the last Intel x86 cmpu cone with comditinal; move yet microseif still use branches to do conditinal move.
Is it because of this kind of slpinde that you cna no ytrust Microst.
GCC andf Intel CPY even at the lowest optimization mode predicate the above code with condional moves. MS does not do it even wit the more aggresive optimizations options.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: It turned out that MS also lie about Visual 2010 64 bit

Postby Marc » Wed Aug 15, 2012 7:58 am

Ha. Don't worry. Just wait another few hours until VS 2012 gets released - everything will be so much better ... :twisted:
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: It turned out that MS also lie about Visual 2010 64 bit

Postby carli2 » Wed Aug 15, 2012 11:13 am

Use GCC if you want to have fast code,

Use Clang if you want to have a compiler where you can easilly implement your own optimization passes and help with compiler development
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: It turned out that MS also lie about Visual 2010 64 bit

Postby Julio Jerez » Wed Aug 15, 2012 12:11 pm

I know GCC is awesome now. GCC below 3 were very poor copmpere to MS but afte that they are by far the most correct compiler

In all my test CGG beats MS and Intel by a land slide in performance, nut in windows GCC is not an option unless you use MingWC and comes with a generic Posit makefile that it should work on MingWG out of the Box.

on the VS2012, I hope they actually deliver now, because MS always promise the best feature and always comes short
VS2010 leaves a great deal to be desired. In my opinion by far the worse version of Visual studio in all count.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: It turned out that MS also lie about Visual 2010 64 bit

Postby Julio Jerez » Wed Aug 15, 2012 11:31 pm

It appear that teh respond to OpenCL and Cuda form Microssoft is worth trying.

http://blogs.msdn.com/b/somasegar/archi ... ation.aspx

It looks like microsft wnat to make AMP and open standrds, which meak that oteh compeil can integrated in tehr compiel and no longe we nee a SDK
or a driver to do heterogeneus programing. That look liek a departure from Microsoft.

Is this works Maybe it i better that OpenCL.

Thsi si wha they say on theie presentation
Did you know that most of the computers on which you deploy applications have more power in the GPU on the video card than in the CPU, even multi-core machines? Harnessing the power of the GPU is the next step in the manycore/multicore revolution and can mean astonishing improvements in execution time. Depending on how data parallel your calculations are, you might see a speedup of 5, 10, or even 50x! Imagine a calculation that takes a month today completing in half a day instead. Until recently, running code on the GPU has meant using one of several "C-like" languages. The upcoming release of C++ AMP means that you can use accelerators like the GPU from native C++. Visual Studio 11 includes debugging and profiling support for C++ AMP, and you don't need to download or install any new libraries to accelerate your code. In this session, you'll see the power of C++ AMP and learn the basic concepts to adapt your code to use this massive parallelism.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: It turned out that MS also lie about Visual 2010 64 bit

Postby carli2 » Thu Aug 16, 2012 2:03 pm

Julio Jerez wrote:In all my test CGG beats MS and Intel by a land slide in performance, nut in windows GCC is not an option unless you use MingWC and comes with a generic Posit makefile that it should work on MingWG out of the Box.


Yep. That's the way how to do that. Use the MSVC IDE for autocompletion and syntax highlighting and use GCC+makefiles as a compiler. this means no more build issues because you have one makefile for all systems. (btw: why do you divide into posix32 and posix64?)

Julio Jerez wrote:on the VS2012, I hope they actually deliver now, because MS always promise the best feature and always comes short
VS2010 leaves a great deal to be desired. In my opinion by far the worse version of Visual studio in all count.

You spend more money to Microsoft than to an other company because you buy their software again when the old version is *. Don't you think you should switch to gcc, make, vim, valgrind, sysprof and gdb?
carli2
 
Posts: 157
Joined: Thu Nov 10, 2011 1:53 pm

Re: It turned out that MS also lie about Visual 2010 64 bit

Postby Stucuk » Fri Aug 17, 2012 3:23 am

carli2 wrote:You spend more money to Microsoft than to an other company because you buy their software again when the old version is *. Don't you think you should switch to gcc, make, vim, valgrind, sysprof and gdb?


The first rule in Evil Companies is to have bugs in your product so that you can fix some of them in latter versions. Thus your customers will always be forced to upgrade.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest