Need help with optimization
- To: mathgroup at smc.vnet.net
- Subject: [mg59152] Need help with optimization
- From: PaulMcHale <Paul.McHale at Barco.com>
- Date: Sat, 30 Jul 2005 01:25:38 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
The following had very different execution times: (*11571 seconds) myPlots = Table[ { Plot[myPolys[[i]], {x, 1, maxX}]}, {i,1, lengthMax} ]; (*38 seconds 300x improvement*) myPlots = Table[Plot[ Evaluate[myPolys[[i]], {x, 1,maxX}], {i, 1, lengthMax}] (*0.7 seconds 55x more improvement, including the plot*) myPlots = Plot[Evaluate[myPolys], {x, 1, maxX}]; Where can I go to get the best advice on programming? It is clear Mathematica can run extremely fast. It can also run horribly slow. How does one tell? These numbers are similar on 5.2. Maybe 6.0 will pre-compile or somehow optimize on it's own. Paul