The following (admittedly dumb) example runs quickly out of Workspace (around -D POWER=1000). The commented variant runs just fine.
Symbol x,n;
Local test = 5*x^`POWER';
repeat id x^n?pos_ = n*x^(n-1);
*#do dummy=1,`POWER'
* id x^n?pos_ = n*x^(n-1);
*#enddo
.sort
Print +s;
.end
Since there already is a check whether one runs out of Workspace, a quick fix might be to first check if the Workspace is saturated with no-longer needed terms? This should not slow down code that would otherwise run through just fine, while reducing the pressure on Workspace somewhat. For repeat generating new terms this limit will be reached even quicker.
The following (admittedly dumb) example runs quickly out of Workspace (around -D POWER=1000). The commented variant runs just fine.
Since there already is a check whether one runs out of Workspace, a quick fix might be to first check if the Workspace is saturated with no-longer needed terms? This should not slow down code that would otherwise run through just fine, while reducing the pressure on Workspace somewhat. For
repeatgenerating new terms this limit will be reached even quicker.