![]() |
array_map speed
Maybe it's just me but I was doing a test and found a normal loop to be faster then array_map (atleast in my case)..here are some of the speed results...
1) looping through an array and using mysql_real_escape_string() on each value 2) using array map with mysql_real_escape_string(); 0.000141 0.00068 0.000161 0.000702 0.000351 0.001889 sorry if this has been pointed out before. |
thanks dude
|
Hmm interesting. I tried three different approaches (array_map, for, foreach) with the following results.
Code:
Test took 7.684968 seconds to complete |
I wonder if anyone else could do a benchmark to see if it's just happen stance. I'm skeptical of my own results since I believed that a built in function would be faster then the aforementioned loop.
|
Here's the results of mine using mysql_real_escape_string on an array with 100 items in it:
Code:
array_map Time Taken: 0.000188 |
| All times are GMT. The time now is 12:19 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0