3 ms·
It's faster if you just store the length in a separate memory location. This is very fast: getLength() { return length; }
by mynameishere 18y ago
It's faster if you just store the length in a separate memory location. This is very fast:
getLength()
{
return length;
}
- tptacek 18y agoI'm worried nobody's going to mod this up because it doesn't talk about bit twiddling hacks or assembly cycle counts, but it is in fact that real answer to this problem. Don't use ASCIIZ when string processing is a bottleneck.