Float to int is slow on ppc. It requires a store, a big stall, and then a load. It's even worse on a G5 if the compiler is dumb (and let's face it, I'm using gcc here...). Just use lroundf when we want an int. It will certainly be no slower.
This commit is contained in:
@@ -71,7 +71,7 @@ static void AddPart( vector<RString> &AddTo, float level, RString name )
|
||||
if( level == 0 )
|
||||
return;
|
||||
|
||||
const RString LevelStr = (level == 1)? RString(""): ssprintf( "%i%% ", (int) roundf(level*100) );
|
||||
const RString LevelStr = (level == 1)? RString(""): ssprintf( "%ld%% ", lroundf(level*100) );
|
||||
|
||||
AddTo.push_back( LevelStr + name );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user