Cache it where? In the zval or the opcode? What if the string changes? How do you detect that and invalidate the cached position?

-Andrei

On Feb 2, 2006, at 5:19 PM, Christian Schneider wrote:

You could cache the last position (PHP- and Unicode string index) and start from there. This assumes that most accesses are (more or less) sequential. If you can step backward as well as forward you could use the cached version for both directions but even if you can only go forward it would cover the most common case I guess.

Very simple idea but maybe it helps,
- Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to