diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2016-12-22 22:58:20 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2016-12-22 23:26:41 +0100 |
commit | 128fb157b302f0f0881844fc7a2fa5653c74a197 (patch) | |
tree | 93f342b5a7a195af211f17ab7044bac2064b81fc /interpreters/README.adoc | |
download | bfc-128fb157b302f0f0881844fc7a2fa5653c74a197.tar.gz bfc-128fb157b302f0f0881844fc7a2fa5653c74a197.tar.xz bfc-128fb157b302f0f0881844fc7a2fa5653c74a197.zip |
Initial commit
Diffstat (limited to 'interpreters/README.adoc')
-rw-r--r-- | interpreters/README.adoc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/interpreters/README.adoc b/interpreters/README.adoc new file mode 100644 index 0000000..ecde608 --- /dev/null +++ b/interpreters/README.adoc @@ -0,0 +1,15 @@ +This directory contains several Brainfuck interpreters in various states of +sophistication, from the simplest approach to an optimizing JIT compiler: + + * `bf.c` is the stupidest one and the oldest by far + * `bf-faster-loops.c` precomputes loop jumps + * `bf-optimizing.c` improves on that by changing `[-]+` loops into assignments + * `bf-jit.c` adds JIT compilation for Intel x86-64 + * `bf-jit-opt.c` tries a bit harder to avoid looping on the current value + * `bf-jit-unsafe.c` abolishes all boundary checks when moving across the tape + * `bf-jit-unsafe-opt.c` makes use of immediate offsets to modify values + +I recommend using a tool such as 'meld' to view the differences. + +Just run `make` in this directory to have them all built, and append +`CPPFLAGS=-DDEBUG` to get dumps of the IR for the more sophisticated JITs. |