Question: What's the use of code generator?

For trivial expressions, we don't need automatic code generation. For complicated expressions, code generator creates lots of temporary variables and the performance is not far from optimal. Once I generated a C program using codegen with 500+ temporary variables and I put that function into a numerical integral as an integrand. The result was very unstable - the integrals are often NaNs. On the other hand, I also convert Maple expression manually into C program which has exactly the same functionality. The result was correct, no NaNs in the integrals at all. So what's the use of code generation in Maple?
Please Wait...