> Only that malicious users may read
> past the end.
There's an entire section after that:
Reducing complexity
Improvement is not that much effective?
Actually, we are optimizing the wrong way!
Really ;)! When optimizing code, you have
to, in order:
reduce complexity;
tune your compiler;
optimize your code.
So, how can we reduce complexity (Currently
O(n) for both algorithms)? Simply by storing
the string length somewhere! The complexity
is then O(1)
etc.
But it's all there, and either you've read it and I don't know what you mean, or you haven't read it, and I've provided the pointer for you.
But it's all there, and either you've read it and I don't know what you mean, or you haven't read it, and I've provided the pointer for you.