reddit is a source for what's new and popular online. reddit learns what you like as you vote on existing links or submit your own!
The effect of compiler optimization settings on MechAssault2 (
151 points posted 2 days ago by jbstjohn

(log in to vote on this article, comment on it, or share it with friends)

sort by


comment deleted
jbstjohn 4 points 1 day ago

I was wondering if that was a typo, and should be &charArray[0], which it would surprise me if it were different than charArray. As it stands, it doesn't seem that surprising.

zhyla 2 points 1 day ago

This is news to me too. I think the types are different (but both const). I think some more explanation is need in the article on this point.

jrockway -17 points 2 days ago* [comment score below threshold] show comment
vertigo 6 points 2 days ago

you didn't do so much scientific research, did you?

permalink parent
jrockway 3 points 1 day ago

I'm saying that the article doesn't really say anything. "I tried -Os and sometimes it makes the program faster."

A good article would talk about why, and under what sort of conditions.

permalink parent
vertigo 1 point 1 day ago

Question was about scientific or not scientific. In my personal experience scientific approach 50% (or more?) of time is to try random combinations, until you find something that is ok for your paper :))

permalink parent
KayEss 1 point 1 day ago

A great article would. A good article points out something interesting happened.

permalink parent
grauenwolf 1 point 18 hours ago

Theory, experiment, measurement, analysis. That is exactly how science works.

permalink parent
jmelesky 3 points 1 day ago

I'd classify this as a case study, not as a research paper. And it's an interesting case study.

permalink parent
Sle 13 points 1 day ago

This is one of the rare times I'm grateful for the existence of consoles, as a PC gamer. When they make a PC only game, their response to this kind of thing is to insist on massive upgrades to a user's system. When a console is nearing the end of its life though, amazing things are done with the hardware, that hark back to the days of the Sinclair Spectrum, which incidentally still has a thriving demoscene that pushes the boundaries to this day. Extra powerful hardware is all very nice, and there are some jawdropping shader effects doing the rounds now, but I can't help thinking there's optimisation that's simply not being done. Imagine the combination of slavish optimisation and high end hardware? I don't think it's ever really seen. Anyway, I'm not a programmer, just a long term gamer with some musings.

senzei 6 points 1 day ago

Optimization takes time. It can be really, really difficult to find an optimization that A) retains the desired behavior and B) is worth all the effort. Hell just finding A. is hard enough. Most game designers see it as a trade off, every developer hour that goes to optimizations could have gone to better AI, prettier graphics, more gameplay, etc.

Generally they pick a somewhat reasonable base target (i.e. "minimum system requirements") declare the performance "acceptable" as long as the framerate doesn't spend too much time below 15fps, and go about their business. Considering the amount of effort required to do this when most gamers will probably be upgrading for someone else's game anyways I don't really blame them.

permalink parent
gbacon 7 points 2 days ago

In [Kang Su Gatlin's slides], linked in the section on whole-program optimization, I got a kick out of the reference he used:

You’re the "wolf"... the one they bring in when performance counts

DTanner 5 points 2 days ago

Obvious advice in retrospect, but these are just some of dozens of optimization strategies. It's great to know which ones have worked on an actual shipped game; these are the ones to try first.

We've got Beta coming up in a few weeks so this may just come in handy ;)

comment deleted
Sle 0 points 1 day ago

Oh bugger, there you go again..

permalink parent