Skip to content

Improving re-parse performance #34

@tomcl

Description

@tomcl

Execution-Top.fs has code that repeatedly re-parses the assembler code to generate a runnable image. the repetition is needed because symbols can have arbitrary forward references. In the normal use case where only a few lines of the program have changed this should not be needed. Instructions without symbols (most of them) do not need to be re-parsed. In fact whole code segments without symbols can be memoised in a pre-parsed and relocatable form and added to the image (in loadImage) in a single operation.

Memoisation is a great technique for speeding up functional code since it is a local change that is provably safe (even though it uses mutable state).

Use memoisation to speed up parsing of long programs (like the sample code from the about menu).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions