"Where security meets simplicity."

Welcome, Guest.

Bench Marking? We don't need no stinking benchmarking!


Posted on 2008.01.19 (02:07 AM) · By ikonic

So, I finally bit the bullet and decided to benchmark our  HTML encoding function and the results where eye opening to say the least. As it turns out, preg_replace is horribly inefficient when dealing with simple strings and though it looked really sweet all coded up, it turned out to be over 5 seconds slower when iterating through the same string 10000 times when compared against str_replace. Also due to the way in which preg_replace works it made a meal out of the encoding process. So, its now all fixed and thanks to our efficient code review process you might notice that the site loads exactly 0.0000381 seconds faster!


By evan at 2008.01.22 (12:04 PM)

I don't know about _you_, but I noticed that the site loads exactly 0.0000382 seconds faster.

Hah, but in all seriousness, good job with the html encoding function.

Add Your Comment

You need to Login to add a comment.



Registered Users Online

Nobody. You should login or register!