pull/1161/head
Rustln 2 years ago committed by GitHub
parent 1ffe9730ed
commit 54b78609a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -93,7 +93,7 @@ $ ./target/debug/world_hello
Hello, world!
```
行云流水,但谈不上一气呵成。 细心的读者可能已经发现,在调用的时候,路径 `./target/debug/world_hello` 中有一个明晃晃的 `debug` 字段,没错我们运行的是 `debug` 模式,在这种模式下,**代码的编译速度会非常快**,可是福兮祸所依**运行速度就慢了**. 原因是,在 `debug` 模式下Rust 编译器不会做任何的优化,只为了尽快的编译完成,让你的开发流程更加顺畅。
行云流水,但谈不上一气呵成。 细心的读者可能已经发现,在调用的时候,路径 `./target/debug/world_hello` 中有一个明晃晃的 `debug` 字段,没错我们运行的是 `debug` 模式,在这种模式下,**代码的编译速度会非常快**,可是祸兮福所倚**运行速度就慢了**. 原因是,在 `debug` 模式下Rust 编译器不会做任何的优化,只为了尽快的编译完成,让你的开发流程更加顺畅。
作为尊贵的读者,咱自然可以要求更多,比如你想要高性能的代码怎么办? 简单,添加 `--release` 来编译:

Loading…
Cancel
Save