|
-
Jun 25th, 2010, 01:54 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] array_shift() vs. array_reverse() + array_pop()
I've read the benchmarking tests conducted on large iterations of data removal from an array using either array_shift() or array_reverse() + array_pop(). array_shift() fails hugely, obviously for having to re-index the entire array.
My question is though; on smaller tests, involving an array with no more than 5 - 10 elements it shouldn't make a significant difference. But how much processing overhead is associated with using array_shift()? What I mean is, if a page using array_shift() on a 5 - 10 element array, is called several times a second, will that still cause significant lag?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|