In the same way as TenFourFox does for nsTextFragment, implement in
string/src/nsReadableUtils.cpp an AltiVec-based scanner. This can be done as a
first approximation thus:
fragmentLength = PRUint32(iter.size_forward());
const PRUnichar* c = iter.get();
const PRUnichar* fragmentEnd = c + fragmentLength;
>> AltiVec stride goes here
// for each character in this chunk...
while ( c < fragmentEnd )
if ( *c++ & NOT_ASCII )
return PR_FALSE;
}
This is likely to gain a lot of performance win, this call is done a lot!
Original issue reported on code.google.com by classi...@floodgap.com on 18 Jan 2012 at 12:34
Original issue reported on code.google.com by
classi...@floodgap.com
on 18 Jan 2012 at 12:34