Quantcast
Channel: a day in the pit » Code
Viewing all articles
Browse latest Browse all 2

PHP array_diff vs foreach: a battle for speed

$
0
0
1000 runs w/ 1000 data elements in the two arrays (php array diff): 2.7389E-5 seconds 1000 runs w/ 1000 data elements in the two arrays (php foreach): 1.085E-7 seconds php array diff slower by 2.728E-5 seconds There were two arrays for this test: $big_set, which had 3147 string elements and $to_diff, which had 1581 string [...]

Viewing all articles
Browse latest Browse all 2

Trending Articles