All pastes #77498 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-07-03 02:50 UTC
rendered paste body
PHP 4.4.2
Initialize 1 million objects: 1167.68 ms
Initialize 1 million arrays: 734.86ms 
Fetch object: 2.35ms 
Fetch array: 0.74ms 
Make object with 1,000 properties: 2.96ms 
Make array with 1,000 keys: 2.54ms 
Foreach through 1,000 object properties: 3.74ms 
Foreach through 1,000 array keys: 2.4ms 
Send 1,000 objects with 500 properties to a function by value: 1400.54ms 
Send 1,000 arrays with 500 keys to a function by value: 1033.07ms 
Send 1,000 objects with 25 properties to a function by value: 78.26ms 
Send 1,000 arrays with 25 keys to a function by value: 51.39ms 
Send 1,000 objects with 500 properties to a function by reference: 1392.78ms 
Send 1,000 arrays with 500 keys to a function by reference: 1067.2ms 
Send 1,000 objects with 25 properties to a function by reference: 79.5ms 
Send 1,000 arrays with 25 keys to a function by reference: 50.37ms 



PHP 5.1.2
Initialize 1 million objects: 752.37 ms
Initialize 1 million arrays: 286.85ms 
Fetch object: 0.89ms 
Fetch array: 0.52ms 
Make object with 1,000 properties: 1.19ms 
Make array with 1,000 keys: 1.38ms 
Foreach through 1,000 object properties: 0.96ms 
Foreach through 1,000 array keys: 1.2ms 
Send 1,000 objects with 500 properties to a function by value: 734.31ms 
Send 1,000 arrays with 500 keys to a function by value: 475.04ms 
Send 1,000 objects with 25 properties to a function by value: 40.94ms 
Send 1,000 arrays with 25 keys to a function by value: 22.07ms 
Send 1,000 objects with 500 properties to a function by reference: 698.29ms 
Send 1,000 arrays with 500 keys to a function by reference: 472.9ms 
Send 1,000 objects with 25 properties to a function by reference: 36.54ms 
Send 1,000 arrays with 25 keys to a function by reference: 25.43ms