ImperialCollegeLondon / ImperialCollegeLondon/Visual2

Improving re-parse performance

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
F#
Stars
49
Forks
7
PR merge metrics
No merged PRs in 30d

Description

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).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading Execution-Top.fs, especially the repeated parsing path and loadImage. Trace how symbols and forward references affect parsing, then use the long sample program from the About menu to measure the current behavior. Done means unchanged programs avoid unnecessary re-parsing while symbol-dependent code still produces a correct runnable image.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
compilers, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.