Submitted ByRohit GuptaS Praveenkumar
Introduction : The code generated for a function or procedure in a dynamically typed language typically has to carry out various type and range checks on its arguments before it can operate on them. These runtime tests can incur a significant performance overhead. As a very simple example, consider the following function to compute the average of a list of numbers.
int Ave (L, Sum, Count) { If null (!L) return ( Sum/Count); else return (Ave (tail (L), Sum+head (L), Count+1)); }