はじめに こんにちは。デリッシュキッチン開発部でバックエンドエンジニアをしている鈴木です。 Go言語の組み込み関数 len() は、一見シンプルに配列やスライスなどの「長さ」を返す関数ですが、その実装はコンパイラやランタイムレベルで特別な扱いを受けています。本記事では、 len の言語仕様からコンパイラ内部の処理フロー、SSA最適化、最終的なアセンブリコード、さらにはruntime内部構造体に至るまでを網羅的に順を追って詳しく説明していきます。 len の仕様と定数評価 まず、Go言語仕様において len
Introduction Hello! This is Matsuo from the Cloud Infrastructure Group. Before I knew it, this August marked the start of my third year with the company. This time, I encountered a minor stumbling block with S3 event notifications, so I decided to put tog