<?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>Benchmark on Moyrn的技术笔记</title>
    <link>/tags/benchmark/</link>
    <description>Recent content in Benchmark on Moyrn的技术笔记</description>
    <generator>Hugo -- 0.128.0</generator>
    <language>zh-CN</language>
    <lastBuildDate>Thu, 28 Jan 2021 13:31:45 +0800</lastBuildDate>
    <atom:link href="/tags/benchmark/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>字符串拼接性能测试</title>
      <link>/posts/20210128_string_join_benchmark/</link>
      <pubDate>Thu, 28 Jan 2021 13:31:45 +0800</pubDate>
      <guid>/posts/20210128_string_join_benchmark/</guid>
      <description>// splicing_test.go package splicing import ( &amp;#34;strconv&amp;#34; &amp;#34;strings&amp;#34; &amp;#34;testing&amp;#34; ) func Str(str []string) string { var rst string for _, s := range str { rst += s } return rst } func BuilderStr(str []string) string { var builder strings.Builder for _, s := range str { builder.WriteString(s) } return builder.String() } func BenchmarkStr(b *testing.B) { srcStr := make([]string, 0, 100000) b.Run(&amp;#34;Append-10000&amp;#34;, func(b *testing.B) { for i := 0; i &amp;lt; 10000; i++ { srcStr = append(srcStr, strconv.</description>
    </item>
  </channel>
</rss>
