Skip to content

Single term repeat using up all Workspace #873

Description

@nikolai-husung

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions