Skip to content

Commit a04245a

Browse files
committed
fix couple minor typos
1 parent 004b1ff commit a04245a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

posts/too-many-brainfuck-compilers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ i64 ; 64 bit integer
16811681
i32 (i32) ; function taking and returning one i32
16821682
void (i8, i8) ; function taking 2 bytes and returning void
16831683
1684-
: pointer types
1684+
; pointer types
16851685
16861686
<type>* ; pointer to <type>
16871687
@@ -2107,7 +2107,7 @@ There's 3 ways we can massively improve the performance of all our compilers.
21072107

21082108
### Interpret during compilation and capture output
21092109

2110-
Brainfuck programs that don't have any `,` (read byte from stdin) commands have deterministic outputs so if a brainfuck program completes in a finite amount of time (as some brainfuck programs are written to execute indefinitely until they get a SIGKILL) then we can interpret it during compilation, capture its output, and the write a compiled program that just prints that output to stdout. This is "the ultimate" optimization as all compiled programs, regardless of how complex their source was, will finish execution nearly instantly and no other optimizations are required. The following 2 optimizations are listed only to take into account brainfuck programs where this optimization cannot be applied (which are programs with `,` in their source or programs that run indefinitely).
2110+
Brainfuck programs that don't have any `,` (read byte from stdin) commands have deterministic outputs so if a brainfuck program completes in a finite amount of time (as some brainfuck programs are written to execute indefinitely until they get a SIGKILL) then we can interpret it during compilation, capture its output, and then write a compiled program that just prints that output to stdout. This is "the ultimate" optimization as all compiled programs, regardless of how complex their source was, will finish execution nearly instantly and no other optimizations are required. The following 2 optimizations are listed only to take into account brainfuck programs where this optimization cannot be applied (which are programs with `,` in their source or programs that run indefinitely).
21112111

21122112

21132113
### Un-loop-ify simple loops

0 commit comments

Comments
 (0)