Name: Anonymous 2011-10-21 11:02
Little Ive writes the following code in a dynamically typed programming language called Anus that features a GC and JIT.
Little Ive then calls the function
How should Anus optimize this? Discuss the situation and its complexities.
var make_tuple = function(x,y){
return function(i){
return (i==0) ? x : y;
}
}Little Ive then calls the function
make_tuple repeatedly with int32 in a tight loop, and sometimes also calls it with other arguments of other types as well.How should Anus optimize this? Discuss the situation and its complexities.