<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>the48</author_name>
  <author_url>https://blog.hatena.ne.jp/the48/</author_url>
  <blog_title>48's diary</blog_title>
  <blog_url>https://bleu48.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>考えてみると初期のGo言語から触ってるが残念で放置していた部分を休日を利用して整理してみた。 そもそもGo言語はforループが遅かった。 初期の頃は遅い理由としてループ変数のリストを先に生成しているのだと説明を聞いたことがある。つまり，０～５のループを回すときに，メモリ上にリスト{0,1,2,3,4,5}を生成していたのである。 その後さすがに修正されたが，面白いことに1.21から1.22でスコープの問題で再度見直されることになった。これは並行計算を実際にコーディングしている人は経験しているだろう。例を挙げよう for i := range 5 { go func() { fmt.Printl…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbleu48.hatenablog.com%2Fentry%2F2026%2F09%2F22%2F124810&quot; title=&quot;Go言語のループ - 48&amp;#39;s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-09-22 12:48:10</published>
  <title>Go言語のループ</title>
  <type>rich</type>
  <url>https://bleu48.hatenablog.com/entry/2026/09/22/124810</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
