Live data from Hacker News

IdTech 4, 15% frame rate increase through semiautomatic paralellization

vectorfabrics.com

41–44 of 44 posts

Re: IdTech 4, 15% frame rate increase through semiautomatic paralellization

#42

For those of us who haven't played Doom 3, is it normal to have those rapid flashes of numbers when you're smacked by one of those red guys in the demo they're showing it off with? Or is this a weird bug introduced somewhere along the line?

Those are absolutely a bug. They probably screwed up and didn't put mutexes around every piece of shared state.

It is not a bug. That effect was already present in the pristine unoptimized code. Quoting Vector Fabrics new blog post [1]:

"Some people wondered if the HUD textures are messed up in the optimized version, because the demo shows that as soon as you get hit by a monster the health and score numbers seem to blow up in your face. The answer is that this is part of the game play and already present in the original unoptimized version."

[1] http://www.vectorfabrics.com/blog/item/accelerating_the_idte...

Re: IdTech 4, 15% frame rate increase through semiautomatic paralellization

#43

Earlier quoted context omitted.

Oh, so I just noticed the "Whitepaper" link, and that has lots more good info in (I wish the blog post was the whitepaper!). So does Pareon depend on running an instrumented build? If so, wouldn't you need a sample data file (map, demo, whatever) that covers 100% of branches and dependencies in order to know for absolutely sure that there are no dependencies between code. Could you make a huge SSA of the program and…

> If so, wouldn't you need a sample data file (map, demo, whatever) > that covers 100% of branches and dependencies in order to know > for absolutely sure that there are no dependencies between code. I am curious about that too. Even 100% statement coverage does not guarantee that you have discovered all dependencies. Think “array of pointers”. You may have good enough coverage to execute once the statement that gets…

The new followup post [1] explains that Pareon indeed partly relies on good coverage:

"Regarding the way Pareon performs its analysis: it relies on instrumentation and therefore coverage is key. The parts of the code of interest should be sufficiently covered. Partly it is the user's responsibility to make sure the right data sets are used. However Pareon helps the user by showing the achieved coverage of the parts you want to parallelize."

[1] http://www.vectorfabrics.com/blog/item/accelerating_the_idte...

Re: IdTech 4, 15% frame rate increase through semiautomatic paralellization

#44
post #24

A 15% framerate increase from 3 weeks of work isn't particularly impressive. It would be more meaningful if the measurement was in terms of frametime (i.e. elapsed time per frame) since framerate is not linear. From looking at the patch (nice of them to provide it), it seems like most of the changes are putting mutexes around things to guard against simultaneous access and then parallelizing some loops. It seems to m…

This is not just middlebrow dismissal, it's outright wrong. In the AAA world we would love to spend only 3 weeks of an engineer's time to get a 15% speedup. Seriously, that is a great deal, it's like, where do I sign up? However, it becomes substantially less impressive when you notice that you're using 2x or 4x the amount of processor hardware (2 or 4 cores) and only getting a 15% speedup. In a by-hand implementatio…

The exercise was more about evaluating what the tool could bring for already-optimized code than about comparing the results against what an expert programmer could achieve manually.

It is true that the application domain of the code chosen for the blog post might be a bit unfortunate in order to make a realistic case. Game engine programmers are usually very good at low level optimizations. Pareon can be used by non-experts though and additionally assist experts in during the task of finding and applying optimizations and paralellization oportunities.

Quoting the blog update [1]:

"Our Pareon tool is not aimed to replace parallelization experts. We want the tool to be useful for any programmer who is looking for paralellization opportunities in either his own code or in code that he is unfamiliar with. A domain expert (game programmer) can probably save some time because of his in-depth knowledge."

Additionally:

"The three additional cores on my four-core machine are only used during part of a rendering cycle. They are sleeping the rest of the time. If I would parallelize other pieces of code in the cycle as well, it would increase utilization and I would expect the frame rate to improve even more."

[1] http://www.vectorfabrics.com/blog/item/accelerating_the_idte...

Post reply on HN