<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>《Go map使用Swiss Table重新实现，性能最高提升近50%》的评论</title>
	<atom:link href="http://tonybai.com/2024/11/14/go-map-use-swiss-table/feed/" rel="self" type="application/rss+xml" />
	<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/</link>
	<description>一个程序员的心路历程</description>
	<lastBuildDate>Wed, 25 Mar 2026 09:21:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7831</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Fri, 13 Jun 2025 21:42:46 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7831</guid>
		<description>是的，go的实现没有是16个slot，而是用了8个slot。google原生发布swiss table算法时默认应该是16 slot。Abseil C++ library采用的应该是16-slot的实现。</description>
		<content:encoded><![CDATA[<p>是的，go的实现没有是16个slot，而是用了8个slot。google原生发布swiss table算法时默认应该是16 slot。Abseil C++ library采用的应该是16-slot的实现。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Kobe</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7830</link>
		<dc:creator>Kobe</dc:creator>
		<pubDate>Fri, 13 Jun 2025 08:25:20 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7830</guid>
		<description>我们看到：swiss table将所谓的桶（这里叫slot）分为多个group，每个group中有16个slot，这也是swiss table的创新，即将开放寻址方法中的probing(探测key碰撞后下一个可用的位置(slot))放到一个16个slot的group中进行，这样的好处是可以通过一个SIMD指令并行探测16个slot，这种方法也被称为Group Probing。

不是 8 个 slot 吗？
https://go.dev/blog/swisstable</description>
		<content:encoded><![CDATA[<p>我们看到：swiss table将所谓的桶（这里叫slot）分为多个group，每个group中有16个slot，这也是swiss table的创新，即将开放寻址方法中的probing(探测key碰撞后下一个可用的位置(slot))放到一个16个slot的group中进行，这样的好处是可以通过一个SIMD指令并行探测16个slot，这种方法也被称为Group Probing。</p>
<p>不是 8 个 slot 吗？<br />
<a href="https://go.dev/blog/swisstable" rel="nofollow">https://go.dev/blog/swisstable</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7796</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Thu, 12 Dec 2024 13:31:40 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7796</guid>
		<description>有些时候compiler&amp;runtime组是这样的，之前我也是完全不知道这事儿。</description>
		<content:encoded><![CDATA[<p>有些时候compiler&amp;runtime组是这样的，之前我也是完全不知道这事儿。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Kukla</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7795</link>
		<dc:creator>Kukla</dc:creator>
		<pubDate>Thu, 12 Dec 2024 07:06:52 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7795</guid>
		<description>是啊，之前没有任何讨论，就决定替换掉了原来的实现
不过今天发现，上星期提交者也开了 issue: https://github.com/golang/go/issues/70683
当然，代码已经提交，这个也就关掉了</description>
		<content:encoded><![CDATA[<p>是啊，之前没有任何讨论，就决定替换掉了原来的实现<br />
不过今天发现，上星期提交者也开了 issue: <a href="https://github.com/golang/go/issues/70683" rel="nofollow">https://github.com/golang/go/issues/70683</a><br />
当然，代码已经提交，这个也就关掉了</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7791</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Tue, 26 Nov 2024 22:35:40 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7791</guid>
		<description>go 1.24中的确可以使用GOEXPERIMENT=synchashtriemap 开启基于hashtriemap的更快的sync.Map https://go.dev/cl/608335</description>
		<content:encoded><![CDATA[<p>go 1.24中的确可以使用GOEXPERIMENT=synchashtriemap 开启基于hashtriemap的更快的sync.Map <a href="https://go.dev/cl/608335" rel="nofollow">https://go.dev/cl/608335</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7790</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Wed, 20 Nov 2024 13:36:10 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7790</guid>
		<description>的确如你所说。不过，这个commit没有任何issue对应，似乎是runtime组自己的一个优化，且目前依然是experiment。看来我对hashtriemap的理解有误。以前sync.Map用的就很少，关注的也不多。</description>
		<content:encoded><![CDATA[<p>的确如你所说。不过，这个commit没有任何issue对应，似乎是runtime组自己的一个优化，且目前依然是experiment。看来我对hashtriemap的理解有误。以前sync.Map用的就很少，关注的也不多。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Kukla</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7789</link>
		<dc:creator>Kukla</dc:creator>
		<pubDate>Wed, 20 Nov 2024 02:34:23 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7789</guid>
		<description>https://github.com/golang/go/commit/aecb8faa91e2b40e3651ee93c8e70635ed367677 这个提交不是替换原始的 sync.Map 吗</description>
		<content:encoded><![CDATA[<p><a href="https://github.com/golang/go/commit/aecb8faa91e2b40e3651ee93c8e70635ed367677" rel="nofollow">https://github.com/golang/go/commit/aecb8faa91e2b40e3651ee93c8e70635ed367677</a> 这个提交不是替换原始的 sync.Map 吗</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7788</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Wed, 20 Nov 2024 01:35:33 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7788</guid>
		<description>此外trie这种结构也叫prefix tree，hash trie更适合高效的前缀查找，比如下面场景：

- 自动补全：在输入时根据前缀快速查找可能的选项。
- 字典实现：用于高效的单词查找和存储。
- 路由表：在网络中管理路由信息。

但可能不适合作为通用hash map的实现。</description>
		<content:encoded><![CDATA[<p>此外trie这种结构也叫prefix tree，hash trie更适合高效的前缀查找，比如下面场景：</p>
<p>- 自动补全：在输入时根据前缀快速查找可能的选项。<br />
- 字典实现：用于高效的单词查找和存储。<br />
- 路由表：在网络中管理路由信息。</p>
<p>但可能不适合作为通用hash map的实现。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7787</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Wed, 20 Nov 2024 01:30:11 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7787</guid>
		<description>这个目前看是给unique包内部用的。虽然提及“can be used elsewhere as well”，但至少目前没看到有proposal说要用其换掉sync.Map的内部实现呢。</description>
		<content:encoded><![CDATA[<p>这个目前看是给unique包内部用的。虽然提及“can be used elsewhere as well”，但至少目前没看到有proposal说要用其换掉sync.Map的内部实现呢。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Kukla</title>
		<link>https://tonybai.com/2024/11/14/go-map-use-swiss-table/#comment-7786</link>
		<dc:creator>Kukla</dc:creator>
		<pubDate>Tue, 19 Nov 2024 08:57:36 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=4391#comment-7786</guid>
		<description>也就是这个 https://github.com/golang/go/blob/master/src/internal/sync/hashtriemap.go</description>
		<content:encoded><![CDATA[<p>也就是这个 <a href="https://github.com/golang/go/blob/master/src/internal/sync/hashtriemap.go" rel="nofollow">https://github.com/golang/go/blob/master/src/internal/sync/hashtriemap.go</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
