Skip to content

Commit

Permalink
Merge branch 'v2' of https://github.com/dt-fe/weekly into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ascoders committed Jul 1, 2019
2 parents 30bdcf1 + 12b1b02 commit 53ae9e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 064.精读《手写 SQL 编译器 - 词法分析》.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function getTokenBlockComment(restStr: string) {
```typescript
while (sqlStr) {
token =
getTokenWhitespace(sqlStr, token) | getTokenBlockComment(sqlStr, token);
getTokenWhitespace(sqlStr, token) || getTokenBlockComment(sqlStr, token);

sqlStr = sqlStr.substring(token.value.length);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

重回 “手写 SQL 编辑器” 系列。这次介绍如何利用缓存优化编译器执行性能。

可以利用 **Frist****Match 节点缓存** 这两种方式优化。
可以利用 **First****Match 节点缓存** 这两种方式优化。

本文会用到一些图做解释,下面介绍图形规则:

Expand Down Expand Up @@ -44,7 +44,7 @@ Match 节点缓存,指在运行时,缓存节点到其第一个终结符的

`select a, b, c, d from e` 这个语句做测试:

| node 节点访问次数 | Frist 集优化 | First 集 + Match 节点缓存优化 |
| node 节点访问次数 | First 集优化 | First 集 + Match 节点缓存优化 |
| ----------------- | ------------ | ----------------------------- |
| 784 | 669 | 652 |

Expand Down

0 comments on commit 53ae9e0

Please sign in to comment.