Skip to content

Commit 26e22e7

Browse files
committed
update README
1 parent 52405bc commit 26e22e7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ for (size_t i = 0; i < code.size(); ++i) {
3737
}
3838
```
3939

40+
### __Basic Optimization__
41+
4042
To optimize the efficiency of the interpreter,
4143
i count consecutive operators instead of just translating operators into an opcode.
4244
You will see the structure of opcode in `jit.cpp`.
@@ -45,10 +47,10 @@ For example:
4547

4648
|bf code|opcode|
4749
|:----|:----|
48-
|`+++`|`buf[p]+=3`|
49-
|`----`|`buf[p]-=4`|
50-
|`>>>>>`|`p+=5`|
51-
|`<<`|`p-=2`|
50+
|`+++`|`buf[p] += 3`|
51+
|`----`|`buf[p] -= 4`|
52+
|`>>>>>`|`p += 5`|
53+
|`<<`|`p -= 2`|
5254

5355
## __Just-In-Time Compiler__
5456

0 commit comments

Comments
 (0)