geektutu / blog

极客兔兔的博客,Coding Coding 创建有趣的开源项目。
https://geektutu.com
Apache License 2.0
166 stars 21 forks source link

Go 死码消除与调试(debug)模式 | Go 语言高性能编程 | 极客兔兔 #124

Open geektutu opened 3 years ago

geektutu commented 3 years ago

https://geektutu.com/post/hpg-dead-code-elimination.html

Go 语言/golang 高性能编程,Go 语言进阶教程,Go 语言高性能编程(high performance go)。本文介绍了编译器在死码消除(Dead code elimination, DCE) 方面的优化,在实际编程中如何利用这一优化提高程序性能。并结合构建标记(build tags) 增加调试模式。

Nigirimeshi commented 3 years ago

学到了,👍

liweiforeveryoung commented 3 years ago

3q

PlasmaNeon commented 2 years ago

如果 a 大于 b,那么将会调用 time.Sleep() 休眠 3 秒。

这个没有在上面的代码中体现吧?代码只调用了fmt.Println()