News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Evert Pot's Blog:
iconv_substr vs mbstring_substr
September 30, 2011 @ 11:03:20

Evert Pot came across an interesting performance issue as he was working through an application that needed to do some string substitutions - the difference between iconv_substr, mb_substr and substr.

While working on an application I ran across a huge bottleneck which I isolated down all the way to the use of the iconv_substr function. If you ever wonder which is better to use, [the benchmark code in the post[ should help your decision.

His results changed quite a bit from machine to machine (and OS/platform to OS/platform) but one statistic stood out on them all - the iconv_substr was slower than mb_substr method....by a lot in one case (about 2100000% slower).

0 comments voice your opinion now!
benchmark iconvsubstr mbstringsubstr substr substring


blog comments powered by Disqus

Similar Posts

Fred Wu's Blog: Ruby on Rails, Passenger (ModRails) vs CodeIgniter and Kohana (Benchmarks)

L2Admin.com: Battle of the server side scripting languages - Perl, Python & PHP

Community News: Seven PHP Projects Finalized in Google Summer of Code 2009

SitePoint PHP Blog: PHPBench.com: Live PHP benchmarks, demystifying "best practices"

Start up web 2.0 Blog: CakePHP & CodeIgniter Benchmark


Community Events





Don't see your event here?
Let us know!


deployment conference release introduction list framework threedevsandamaybe laravel podcast code voicesoftheelephpant series symfony interview community tips api bugfix zendserver language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework