[php-src] PR #24024: ext/mbstring: Validate and flag UTF-8 in mb_strlen() to improve performance

From: Date: Wed, 30 Sep 2026 15:44:03 +0000
Subject: [php-src] PR #24024: ext/mbstring: Validate and flag UTF-8 in mb_strlen() to improve performance
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39003@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24024 Author: kamil-tekiela I thought that this change would improve performance for repeated calls of mb_strlen but to my surprise, it actually improves the performance for any UTF-8 string. Non-valid characters suffer a small perf penalty, but it's within reason. For an unmarked string the performance improvement tends to be between 10% and 300%. For a marked string, the improvement tends to be 2x - 4x.

« previous php.git-pulls (#39003) next »