For numerical work (double floats), translated code can
be much faster than interpreted; for symbolic work, I've
not seen much advantage to translation. Maybe a new
"tiny translator" could focus on numerical code and
punt to meval for most everything else. A tiny example:
(%i1) f(n) := block([s],mode_declare(s, float,n,integer,i,integer), s :
0.0, for
i : 1 thru n do s : s + 1.0/i,s)$
Before translation:
(%i3) f(10^6);
Evaluation took 15.45 seconds (15.45 elapsed)
(%o3) 14.392726722864781
After:
(%i5) f(10^6);
Evaluation took 0.60 seconds (0.60 elapsed)
(%o5) 14.392726722864781
%i6) h(n) := block([x], subst(x=1, diff(x^x,x,n)))$
Evaluation took 0.00 seconds (0.00 elapsed)
Before:
(%i7) h(13);
Evaluation took 7.03 seconds (7.03 elapsed)
(%o7) -47607144
After:
(%i9) h(13);
Evaluation took 7.08 seconds (7.08 elapsed)
(%o9) -47607144
(%i10)
Barton