background image

  

ary2(50000) 0.075

  

ary3(2000) 0.561

  

fibo(30) 1.156

  

hash1(50000) 0.114

  

hash2(500) 0.091

  

heapsort(20000) 0.270

  

matrix(20) 0.276

  

nestedloop(12) 0.599

  

sieve(30) 0.350

  

strcat(200000) 0.039

  

------------------------

  

Total 7.844

 
  

SWITCH 方式:

 
  

laruence@dev01.tc$ sapi/cli/php bench.php

  

simple 0.393

  

simplecall 0.414

  

simpleucall 0.424

  

simpleudcall 0.445

  

mandel 1.007

  

mandel2 1.254

  

ackermann(7) 0.392

  

ary(50000) 0.084

  

ary2(50000) 0.073

  

ary3(2000) 0.593

  

fibo(30) 1.185

  

hash1(50000) 0.120

  

hash2(500) 0.092

  

heapsort(20000) 0.285

  

matrix(20) 0.295

  

nestedloop(12) 0.678

  

sieve(30) 0.359

  

strcat(200000) 0.042

  

------------------------

  

Total 8.138

 
  

GOTO 方式 :

 
  

laruence@dev01.tc$ sapi/cli/php bench.php

  

simple 0.306

  

simplecall 0.373

  

simpleucall 0.369

  

simpleudcall 0.385