Implement AltiVec-accelerated IsASCII
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
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
- Blocked on: #154
Google Code Exporter commented
In fact, there are two IsASCIIs and one IsUTF8. We should do all three.
Original comment by classi...@floodgap.com
on 18 Jan 2012 at 12:36