Welcome Guest, Not a member yet? Register   Sign In
result vs result_array
#1

[eluser]Unknown[/eluser]
Which function is the most efficient when passing the data to a view, result() or result_array() ? I am assuming that result_array takes slightly longer because the data must be converted into an array first, I just want to make sure.
#2

[eluser]Phil Sturgeon[/eluser]
Some benchmarks were done a little while ago showing that arrays are actually 0.002% faster or something silly like that, but it really doesn't make enough difference to worry about. Just pick whichever syntax you like the most.
#3

[eluser]jalalski[/eluser]
I think it was between 0.002% and 0.0043% depending on the caching/hashing algorithm used. I know that if you have like a gazillion arrays to convert it can make a difference of quite a few millisecs and, hey, a millisec here, millisec there, soon your talking real time... Smile




Theme © iAndrew 2016 - Forum software by © MyBB