Skip to content

Add O(1) append to astn_list #15

@dmezh

Description

@dmezh

list_append() becomes a big problem because we need to append very often and the runtime blows up for large input programs. The current append is O(n). For:

int i = 0;
i++; // #1
i++; // #2
i++; // #3 
...
i++; // #40000

dcc spends 99.5% of time in list_append(), exhibiting O(n^2) runtime for number of i++'s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions