How I Optimized F-1 Spirit for Mobile Processors


ekianjo

Hardcore Member
Joined
May 7, 2012
Messages
8,261
Location
神戸市、日本 (Japan)
An article I asked PtitSeb to write for a long time, so I hope you guys appreciate his effort (don't ask me how many times I had to remind him to finish the article). A very interesting outlook at how he did all his optimizations on F-1 spirit to make it run super fast on Pandora.



--> Continue Reading

promof1.png
 
Last edited by a moderator:
Whoa!  Optimization is so complicated.  They say it's easier to start from scratch than fix someone else mess :)
Well F1 spirit was made for desktops in 2004, so it was probably appropriate at the time in terms of performance. But I really like what PtitSeb did to increase the overall performance for Pandora, and how dramatic that was!
 
@ptitSeb:

great read, thanks.

On a side note, with these cosl/sinl on top I would have add cos/sin tables for speed boost :D (probably near useless but ...)
 
On a side note, with these cosl/sinl on top I would have add cos/sin tables for speed boost  :D (probably near useless but ...)
Since the game is GPU limited it would probably be useless.

But in a similar case I first changed the input parameters to floats so the compiler generates cosf/sinf instead of cosl/sinl.

And since usually both cos and sin were computed (with the same parameter) I put the parameter in a temporary variable (float of course) and I put the calls close to each other so the compiler generates one call to sincosf instead of two calls to cosf and sinf.

And yes, the article was a good read.
 
Nice article, thanks.

I found it quite surprising that each tile loads its own texture. That's probably one of the most frequent beginners' mistakes. :huh:
 
Nice video IngoReis ! 

Could you take a video of the current version ? That would be a good benchmark "before" and "after" PtitSeb's work ! 

I could add them to the article!
 
Back
Top