Crystal 0.24 版的 crystal 编译速度又降下来了

gaicitadie · 2018年03月26日 · 最后由 isaced 回复于 2018年09月04日 · 6783 次阅读

以前 0.1x 版的时候,编译一个 hello world,需要 0.5 秒左右,比 golang 稍微慢一点,刚才升级到了 0.24.1 版,编译 hello world 需要 1 秒多了,跟 golang 相比毫无竞争力。编译器真是个拼爹的东西

golang 语法简单吧,crystal 好处就是写起来爽

time crystal build x.cr
crystal build x.cr  1.83s user 0.68s system 158% cpu 1.582 total
➜  crystal version     
Crystal 0.26.0 (2018-08-17)

LLVM: 6.0.1
Default target: x86_64-apple-macosx

➜  time crystal build helloworld.cr

crystal build helloworld.cr  0.65s user 0.19s system 126% cpu 0.661 total
需要 登录 后方可回复, 如果你还没有账号请 注册新账号