Let's talk Compilers...

Creating the perfect compiler is one of the more difficult problems in computing. Compiler optimization and scheduling is an NP-complete problem (think chess) so we can't "solve" it. And compounding the issue is that the best compiled code comes from a compiler that is written specifically for a certain processor and knows it inside and out. If we were to use a standard compiler to produce standard x86 code, our program will run much slower than if we tell our compiler we have a P4 with SSE2 and all the goodies that go along with it. I know this all seems pretty obvious, but allow me to illustrate a little.

Since I've always been interested in 3D graphics, back in 1998 I decided to write a 3D engine with a friend of mine for a project in our C++ class. It only did software rendering, but we implemented a software z-buffer and did back face culling with flat shading. Back then, my dad had a top of the line PII 300, and I acquired an AMD K6 200. Using a regular Borland C++ compiler with no real optimizations turned on, our little software 3D engine ran faster on my K6 than it did on my dad's PII. Honestly, I have no idea why that happened. But the point is that the standard output of the compiler ran faster on my slower platform while both systems were producing the same output. Now, if I had had a compiler from Intel optimized for the PII that knew what it was doing (or if I had hand coded the program in assembly for the PII), my code could have run insanely faster on my dad's box.

So, there are some really important points here. Intel and AMD processors were built around the same ISA (Instruction Set Architecture) and had a great deal in common back in 1998. Yet, performance varied in favor of the underpowered machine for my test. When you look at ATI and NVIDIA, their GPUs are completely and totally different. Sure, they both have to be able to run OpenGL and DirectX9, but this just means they are able to map OGL or DX9 function calls (via their drivers) to specific hardware routines (or even multiple hardware operations if necessary). It just so happens that the default Microsoft compiler generates code that runs faster on ATI's hardware than on NVIDIA's.

The solution NVIDIA has is to sit down with developers and help handcode stuff to run better on their hardware. Obviously this is an inelegant solution, and it has caused quite a few problems (*cough* Valve *cough*). The goal NVIDIA has is to eliminate this extended development effort via their compiler technology.

Obviously, if NVIDIA starts "optimizing" their compiler to the point where their hardware is doing things not intended by the developer, we have a problem. I think its very necessary to keep an eye on this, but its helpful to remember that such things are not advantageous to NVIDIA. Over at Beyond3d, there is a comparison of the different compiler (DX9 HLSL and NV Cg) options for NVIDIAs shaders.

We didn't have time to delve into comparisons with the reference rasterizer for this article, but our visual inspections confirm Beyond3d's findings. Since going from the game code to the screen is what this is all about, as long as image quality remains pristine, we think using the Cg compiler makes perfect sense. It is important to know that the Cg compiler doesn't improve performance (except for a marginal gain while using AA), and does a lot over the 45.xx dets for image quality.

Tomb Raider: Angel of Darkness Back to the game...
Comments Locked

117 Comments

View All Comments

  • Anonymous User - Thursday, October 9, 2003 - link

    "We were told by NVIDIA that these new drivers would not only improve performance, but that they would be made publicly available the very same week we tested with them. Obviously, that didn't happen, and it ended up taking another month before the drivers were released. The performance gains were tangible, but the drivers weren't fit for release when NVIDIA provided them to the press and honestly shouldn't have been used.


    Hindsight being 20/20, we made a promise to ourselves that we would *not allow any further performance enhancing drivers to be used in our video card reviews unless we could make the drivers publicly available to our readers immediately.*"

    -Anand Lal Shimpi
    October 17, 2001

    Ah how the world turns.
  • Anonymous User - Wednesday, October 8, 2003 - link

    "If you think that's wrong, then you have a problem."

    If anand had not stated that he would not do benchmarks with unreleased drivers then you might have a point.
    Especially if an in-depth examination of the filtering and antialiasing quality had been undertaken. Too bad that didnt happen, despite what was claimed in the introduction.


    Making oneself a hypocrite to appease the publics' whims by using unavailible software (for one manufacturer, but not another) is a direct shot to your own credibility.

    But credibility is no longer important to this site, and many of the other premiere hardware review sites.

    Page hits and advertisments pay the bills, do whatever it takes.
  • Anonymous User - Wednesday, October 8, 2003 - link

    This is the most interesting sentence I found in this review:
    "It just so happens that the default Microsoft compiler generates code that runs faster on ATI's hardware than on NVIDIA's."

    So it is M$'s fault that nVidia's card runs slower? How do you know? Plus the numerous problem mention by other people, I can't believe this is from a famous harware review site. I don't think this review will earn nVidia any credit, instead Anandtech lose credit for it.

    BTW, I don't think a driver update can improve performance by 50%, as the 52.* driver did, unless the old 45.* driver were written by a new graduate. There MUST be some trick in the 52.* driver.

  • Anonymous User - Wednesday, October 8, 2003 - link

    Hey Mr. NostraDUMASS (#93), you want some cheese to go with that whine?
    NV40 will be 3D king?! Only in a 4D world, dreamer.
    Looking at the graphs and the numbers pretty much sums it all up - a crushing defeat for you know who. Anand and his crew did a decent job. They even tried to candy-coat it to appease the big N.
  • Anonymous User - Wednesday, October 8, 2003 - link

    nvidia is coming back slowly due to stupid policy and strategy of nvidia ceo they have lost their supremacy and reputation in 3d graphics world but i'm sure next gen... nv 40 will be 3d king nvidia is smarter than ati . ati architecture is built on brute force of 8 pipelines and 256 bit memory nvidia cine fx is much more sophisticated.
  • RoninCS - Wednesday, October 8, 2003 - link

    You know why he used them? Simple, actually. Because people wanted him to test them, and the public at large wanted to see how they perform. If you think that's wrong, then you have a problem.
  • Anonymous User - Wednesday, October 8, 2003 - link

    Im highly amused that anyone would flame someone for taking anand to task for using UNRELEASED DRIVERS WHICH ARE IN NO SENSE AVAILIBLE TO THE PUBLIC THROUGH THE MANUFACTURER.

    Anand has said on several different occassions in the past that he would NEVER BENCHMARK WITH UNRELEASED DRIVERS.

    He lied.

    He did not bother to investigate the veracity of the claims nvidia made about image quality, inluding the total lack of true trilinear filering.
    Why not? Nobody knows, and anand won't say.

    There are several very well established methods for determining the true quality of a cards' filtering and antialiasing scheme.
    Anand used none of them.
    Why?
    Coincidentally, everyone who has actually bothered to check the quality of the nvidia AF on any driver in the 50/51 or 52 series has found trlinear filtering simply does not work as advertised.

    Indeed, far from predicting future DX9 title performance, the new test suite appears to be heavily biased toward legacy DX8/8.1 pixel shading, something the FX architecture is basically built for, and excels at.

    The game (TR:AOD) that probably uses the largest number of DX9-class shaders (PS2.0) was not even listed in terms of absolute numbers. Instead, we have a percent decrease!!!
    Why was this single game treated so differently when it would likely be the best predictor (along with Doom3 in ARB2 generic mode, and HL2) of future shader performance?

    Coincidentally, the R3XX architecture dominates this test - absolute frame rates would have been heavily embarassing for nvidia.
    Lucky anand didnt bother to list them! Instead, he spent several paragraphs discussing water that didnt render quite right.

    The GeForceFX family are decent cards, with very good performance indeed in DX8 class games. DX9 games with real DX9-class shaders is a different story altogether.

    But you won't be getting that story here, and anyone who bothers to bring it up will be labeled an "ATI fanboy".

    How sad.
    How childish.
    How utterly self-serving.

    This article proves quite handily just how much of anand's credibility has been lost. Anand has jumped on the Thomas Pabst bandwagon.
    Next stop, [H]ardOCP.
    Toot, Toot!
  • Anonymous User - Wednesday, October 8, 2003 - link

    what happened 2 ur glasses anand ?? just by looking at it u can see clear differences in the way NV and ATI render aquamark. and what about the missing FPS in TRAOD ?? instead of writing summin like "NVIDIA really gets crushed by ATIs PS2 performance." ur saying " It is very clear that the way ATI handles rendering TRAOD's PS2.0 code is more efficient." and only show sum _absolute irrelevant_ ps2 ratios not correlating with each card in ANY WAY ?!? ooookay, so ur praccing 4 ur politician-career, arent ya ? honestly, that article feels so biased towards NV its just not decent anymore...anandtech was my favourite site when it comes 2 reviews but after that i rather stick 2 another one when it comes 2 gfx cards it seems.
    i really wondered how anand could be the first site benching a gfx5950 and here we got the answer it seems...gn8
  • RoninCS - Wednesday, October 8, 2003 - link

    To 90, perhaps you should be a writer for Anandtech instead, since you seem to be much more critical, although it would appear you don't run a world reknowned hardware site.

    Talk about critical...sheesh.
  • Anonymous User - Wednesday, October 8, 2003 - link

    I think Anandtech should consider that quantity doesn't equal quality.

    If it was only fps, then lots of games is perfect. But we were supposed to be talking IQ in this part. Well... I saw very little actually written about IQ in the article.

    On the very first page, I immediately notice big differences in IQ. On the tank I see lots of places were the NVidia drivers don't seem to do any AA. And the details around the explosion are far more blurry. Those things are obvious allthough I'm looking at a reduced size JPG! And I see no remark about IQ at all !?!?!?

    Going to F1 challenge to the 4xAA/8xAF. Or is it? I see absolutely no AA *anywhere* with the NVidia drivers. And it really really really obvious in these shots!! Again, no comment about IQ at all?

    Do I need to go on? Gunmetal also shows AA differences.

    Finally, with Homeworld Anandtech notices too that there's no AA with the NVidia drivers.
    Luckily, it's a know issue...

    Jedi Knight. Well, here the NVidia does do some AA. But it's really little compared to ATI's. No IQ difference???

    Neverwinter. Look at the pilar to the right, and the plants on the left. Do we again see clear AA differences, like NVidia seem to forget those objects?

    But it gets worse...

    How on earth can anyone place these utterly rediculous Tomb Raider and Wolfenstein screenshots??????
    Come on! I've seen beautifull screenshots of streets in Paris in Tomb Raider. Perfect for testing IQ. And all we get is a 90% black screen? Same goes for Wolfenstein...

    What where you guys thinking?????????

    This is so incredibly far below the high standards that I'm used from Anandtech...
    Please look again at this article, and do a proper job at assesing IQ.

Log in

Don't have an account? Sign up now