Previous: Advanced, Up: libstack.a


6.3.5 Overhead of stack extension

The additional code needed for stack extension (or checking) costs memory and CPU power. Here are some numbers to give you a very rough idea for it. (Times are in 1/60s, sizes in bytes):

     Test		  normal      checking	   extending	 extending
     		(big stack)  (big stack)  (big stack)  (small stack)
     
     Simple recursive
     function runtime    152 	221	      225	     226
     (function calling
     overhead)
     
     Variable sized	     52 	136	      398	     468
     array runtime
     
     alloca runtime	     31 	118	      118	     118
     
     Own code size	   1040        1160	     1140
     
     Library code size     0 	184	      788