Skip to content

Commit

Permalink
README and version update.
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmorgan committed Sep 6, 2024
1 parent e2ab3ce commit 351444c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OPTIMISE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ As alluded earlier, the next optimisation was to combine repeated instructions a

## Complex Instructions

The next step for finding areas of improvement was to take existing BF code and analyse it for common patterns. Out of that was a new instruction internally called "move", it takes the data from one cell and moves it by an offset. This has two variations where a decrement instruction was at the start of the loop and alternatively at the end (`[->>+<<]` vs `[>>+<<-]`). Again, functionally the result is the same. Later another common patter was discovered was what I called a skip instruction where the code looks through a series of values to stop on the first zeroed one `[>]`.
The next step for finding areas of improvement was to take existing BF code and analyse it for common patterns. Out of that was a new instruction internally called "move", it takes the data from one cell and moves it by an offset. This has two variations where a decrement instruction was at the start of the loop and alternatively at the end (`[->>+<<]` vs `[>>+<<-]`). Again, functionally the result is the same. Later another common pattern was discovered was what I called a skip instruction where the code looks through a series of values to stop on the first zeroed one `[>]`.

## Performance Analysis

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Operates with a instruction parse then execute pattern.
* [>>+<<-] is merged into a move instruction.
* [<+++++>-] is converted to a multiply instruction.
* [<<+>+>-] is converted to a duplicate instruction.
* [<+++++>->+++++<] is converted to a vector multiply instruction.
* and dead code removal.

for performance comparison see no_optimisation branch.
Expand Down
2 changes: 1 addition & 1 deletion cmd/bfg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Options:

var (
// Version is the main version number that is being run at the moment.
Version = "0.1.1"
Version = "0.1.2"

// VersionPrerelease is A pre-release marker for the Version. If this is ""
// (empty string) then it means that it is a final release. Otherwise, this
Expand Down

0 comments on commit 351444c

Please sign in to comment.