<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Heap on Tony Bai</title><link>https://tonybai.com/tags/heap/</link><description>Recent content in Heap on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Tue, 19 May 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/heap/index.xml" rel="self" type="application/rss+xml"/><item><title>代码可以让 AI 写，但设计得由你做：重塑工程师的“算法直觉”</title><link>https://tonybai.com/2026/05/19/ai-era-software-engineer-algorithm-map/</link><pubDate>Tue, 19 May 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/05/19/ai-era-software-engineer-algorithm-map/</guid><description>本文永久链接 – https://tonybai.com/2026/05/19/ai-era-software-engineer-algorithm-map 大家好，我是Tony Bai。 “帮我写一个限流器。” 当你把这行字敲进 Claude、Gemini 或ChatGPT 的对话框或CLI形式的命令行时，几秒钟后，屏幕上会出现一段看似完美的 Go 代码。它可能使用了 Token Bucket ...</description></item><item><title>再见，丑陋的 container/heap！Go 泛型堆 heap/v2 提案解析</title><link>https://tonybai.com/2026/02/04/goodbye-container-heap-go-generic-heap-heap-v2-proposal/</link><pubDate>Wed, 04 Feb 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/02/04/goodbye-container-heap-go-generic-heap-heap-v2-proposal/</guid><description>本文永久链接 – https://tonybai.com/2026/02/04/goodbye-container-heap-go-generic-heap-heap-v2-proposal 大家好，我是Tony Bai。 每一个写过 Go 的开发者，大概都经历过被 container/heap 支配的恐惧。 你需要定义一个切片类型，实现那个包含 5 个方法的 heap.Interface，在 P...</description></item><item><title>内存去哪儿了？一个让大多数 Gopher 都无法清晰回答的问题</title><link>https://tonybai.com/2026/01/15/where-did-the-memory-go-gopher-unanswered-question/</link><pubDate>Thu, 15 Jan 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/01/15/where-did-the-memory-go-gopher-unanswered-question/</guid><description>本文永久链接 – https://tonybai.com/2026/01/15/where-did-the-memory-go-gopher-unanswered-question 大家好，我是Tony Bai。 &amp;gt; “我的服务内存又在缓慢增长了，pprof 显示不出明显的泄漏点……**内存到底去哪儿了？**” 这句午夜梦回的拷问，或许是许多 Go 开发者心中最深的恐惧。 这一切的根源，可能始于一...</description></item><item><title>解构Go并发之核，与Dmitry Vyukov共探Go调度艺术</title><link>https://tonybai.com/2025/06/18/inside-goroutine-scheduler-column/</link><pubDate>Wed, 18 Jun 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/06/18/inside-goroutine-scheduler-column/</guid><description>解构Go并发之核，与Dmitry Vyukov共探Go调度艺术 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶课FAQ *...</description></item><item><title>一个字符引发的30%性能下降：Go值接收者的隐藏成本与优化</title><link>https://tonybai.com/2025/04/25/hidden-costs-of-go-value-receiver/</link><pubDate>Fri, 25 Apr 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/04/25/hidden-costs-of-go-value-receiver/</guid><description>一个字符引发的30%性能下降：Go值接收者的隐藏成本与优化 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶课FAQ * 关...</description></item><item><title>理解unsafe-assume-no-moving-gc包</title><link>https://tonybai.com/2023/04/16/understanding-unsafe-assume-no-moving-gc/</link><pubDate>Sun, 16 Apr 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/04/16/understanding-unsafe-assume-no-moving-gc/</guid><description>本文永久链接 – https://tonybai.com/2023/04/16/understanding-unsafe-assume-no-moving-gc 1\. 背景 ------ 在之前的《Go与神经网络：张量计算》一文中，不知道大家是否发现了，所有例子代码执行时，前面都加了一个环境变量ASSUME\_NO\_MOVING\_GC\_UNSAFE\_RISK\_IT\_WITH，就像下面...</description></item><item><title>Go 1.19中值得关注的几个变化</title><link>https://tonybai.com/2022/08/22/some-changes-in-go-1-19/</link><pubDate>Mon, 22 Aug 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/08/22/some-changes-in-go-1-19/</guid><description>本文永久链接 – https://tonybai.com/2022/08/22/some-changes-in-go-1-19 我们知道Go团队在2015年重新规定了团队发布版本的节奏，将Go大版本的发布频率确定为每年两次，发布窗口定为每年的2月与8月。而实现自举的Go 1.5版本是这一个节奏下发布的第一个版本。一般来说，Go团队都会在这两个窗口的中间位置发布版本，不过这几年也有意外，比如承载着泛...</description></item><item><title>通过实例理解Go Execution Tracer</title><link>https://tonybai.com/2021/06/28/understand-go-execution-tracer-by-example/</link><pubDate>Mon, 28 Jun 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/06/28/understand-go-execution-tracer-by-example/</guid><description>本文永久链接 – https://tonybai.com/2021/06/28/understand-go-execution-tracer-by-example Netflix（奈飞公司）的性能架构师Brendan Gregg在其《BPF Performance Tools》一书中对tracing、sampling等概念做了细致描述，以帮助开发人员理解这些概念，并基于这些概念对性能优化辅助工具进...</description></item><item><title>通过实例理解Go逃逸分析</title><link>https://tonybai.com/2021/05/24/understand-go-escape-analysis-by-example/</link><pubDate>Mon, 24 May 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/05/24/understand-go-escape-analysis-by-example/</guid><description>本文永久链接 – https://tonybai.com/2021/05/24/understand-go-escape-analysis-by-example 翻看了一下自己的Go文章归档，发现自己从未专门写过有关Go逃逸分析（escape analysis）的文章。关于Go变量的逃逸分析，大多数Gopher其实并不用关心，甚至可以无视。但是如果你将Go应用于性能敏感的领域，要完全压榨出Go应用...</description></item><item><title>Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱[译]（第二部分）</title><link>https://tonybai.com/2021/03/29/darker-corners-of-go-part2/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/29/darker-corners-of-go-part2/</guid><description>本文翻译自Rytis Bieliunas的文章《Darker Corners of Go》。 第一部分参见[《Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱\[译\]（第一部分）》](https://tonybai.com/2021/03/29/darker-corners-of-go-part1) 7\. 字符串和字节数组 ------------ 1) Go中的字符串 Go字符串的内...</description></item><item><title>Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱[译]（第一部分）</title><link>https://tonybai.com/2021/03/29/darker-corners-of-go-part1/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/29/darker-corners-of-go-part1/</guid><description>本文翻译自Rytis Bieliunas的文章《Darker Corners of Go》。 &amp;gt; 译注：若干年前，Kyle Quest曾发过一篇名为“50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs”的文章，仿效著名的《C Traps and Pitfalls》编写了50条Go语言的陷阱与缺陷，一时在G...</description></item><item><title>可视化Go内存管理</title><link>https://tonybai.com/2020/03/10/visualizing-memory-management-in-golang/</link><pubDate>Tue, 10 Mar 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/03/10/visualizing-memory-management-in-golang/</guid><description>本文翻译自《Visualizing memory management in Golang》。 “内存管理”系列的一部分 在这个由多部分组成的系列文章中，我旨在揭示内存管理背后的概念，并对某些现代编程语言的内存管理机制做更深入的探究。我希望该系列文章可以使您对这些语言在内存管理方面正在发生的事情能有所了解。 在本章中，我们将研究Go编程语言（Golang）的内存管理。和C/C++、Rust等一样，...</description></item><item><title>图解Go内存分配器</title><link>https://tonybai.com/2020/02/20/a-visual-guide-to-golang-memory-allocator-from-ground-up/</link><pubDate>Thu, 20 Feb 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/02/20/a-visual-guide-to-golang-memory-allocator-from-ground-up/</guid><description>本文翻译自《A visual guide to Go Memory Allocator from scratch (Golang)》。 当我刚开始尝试了解Go的内存分配器时，我发现这真是一件可以令人发疯的事情，因为所有事情似乎都像一个神秘的黑盒(让我无从下手)。由于几乎所有技术魔法都隐藏在抽象之下，因此您需要逐一剥离这些抽象层才能理解它们。 在这篇文章中，我们就来这么做(剥离抽象层去了解隐藏在其下...</description></item><item><title>Go 1.13中值得关注的几个变化</title><link>https://tonybai.com/2019/10/27/some-changes-in-go-1-13/</link><pubDate>Sun, 27 Oct 2019 00:00:00 +0800</pubDate><guid>https://tonybai.com/2019/10/27/some-changes-in-go-1-13/</guid><description>2019年对于Go语言来说也是一个重要的年份，因为在2019年的11月10日，Go即将迎来其开源10周年的纪念日。在这个重要日子的前夕，在GopherCon 2019大会后，Go项目组在2019.9.4日发布了Go 1.13版本。 这是自2017年GopherCon大会上Russ Cox做“Toward Go 2″主题演讲以来Go项目发布的第四个版本（前三个分别是：go 1.10、go 1.11和...</description></item><item><title>Go语言是如何处理栈的</title><link>https://tonybai.com/2014/11/05/how-stacks-are-handled-in-go/</link><pubDate>Wed, 05 Nov 2014 00:00:00 +0800</pubDate><guid>https://tonybai.com/2014/11/05/how-stacks-are-handled-in-go/</guid><description>Go 1.4Beta1刚刚发布，在Go 1.4Beta1中，Go语言的stack处理方式由之前的&amp;#34;segmented stacks&amp;#34;改为了&amp;#34;continuous stacks&amp;#34;。关于Go语言对stack的处理机制、发展历史、存在问题等，CloudFlare的一篇官方blog进行了系统的阐述，这里的内容就是 翻译自CloudFlare的那篇blog：《How Stacks are Handled i...</description></item></channel></rss>