sicp-ex-5.45



<< Previous exercise (5.44) | Index | Next exercise (5.46) >>


meteorgan

  
  
 compiled: 
 n       total-pushes    maximum-depth 
 2            13                      5 
 3            19                      8 
 4            25                     11 
 so, total-pushes is 6n+1, maximum-depth is 3n-1. 
 total-pushes: 
 compiled/interpretation: (6n+1)/(32n-16) -> 0.1875 
 special/interpretation:     (2n-2)/(32n-16) -> 0.0625 
 maximum-depth: 
 compiled/interpretation: (3n-1)/(5n+3) -> 0.6 
 special/interpretation:     (2n-2)/(5n+3) -> 0.4