From 351444c812c4a13f4f1a3818f8e4b57ab7f19fdd Mon Sep 17 00:00:00 2001 From: Tristan Morgan Date: Fri, 6 Sep 2024 11:06:09 +1000 Subject: [PATCH] README and version update. --- OPTIMISE.md | 2 +- README.md | 1 + cmd/bfg/main.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OPTIMISE.md b/OPTIMISE.md index aa63c3d..59a804b 100644 --- a/OPTIMISE.md +++ b/OPTIMISE.md @@ -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 diff --git a/README.md b/README.md index 42428c9..91334d7 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/cmd/bfg/main.go b/cmd/bfg/main.go index 0bec5a0..e9ab50f 100644 --- a/cmd/bfg/main.go +++ b/cmd/bfg/main.go @@ -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