Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
po3rin
September 11, 2026
Programming
100
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
リポジトリ
https://github.com/po3rin/gocon2026-simd-search
po3rin
September 11, 2026
More Decks by po3rin
See All by po3rin
Driving AI Adoption Using In-House GPUs to Serve Qwen
po3rin
2
460
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
2.3k
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
1.5k
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
530
嗚呼、当時の本番環境の状態で AI Agentを再評価したいなぁ...
po3rin
0
620
Temporal Knowledge Graphで作る! 時間変化するナレッジを扱うAI Agentの世界
po3rin
7
2.4k
自作LLM Native GORM Pluginで実現する AI Agentバックテスト基盤構築
po3rin
2
1.2k
麻雀点数計算問題生成タスクから学ぶ Single Agentの限界と Agentic Workflowの底力
po3rin
5
3.2k
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
1.3k
Other Decks in Programming
See All in Programming
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
230
AIエージェント時代のコードレビューを設計する
nogu66
6
2.5k
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
130
型解析で実現する Go の言語内 DSL / Conference に Go! タイムテーブルの歩き方 for Gophers
mazrean
0
130
バグを直したら useEffect が消えた
colorful12
3
840
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
270
Deep dive into the select statement (GopherCon UK)
jespino
0
170
自分的「カンファレンスの楽しみ方」
syumai
0
190
typoなんかねぇよ
raspython3
0
670
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
2
350
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
250
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
690
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
So, you think you're a good person
axbom
PRO
2
2.1k
Technical Leadership for Architectural Decision Making
baasie
3
560
AI: The stuff that nobody shows you
jnunemaker
PRO
9
970
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Deep Space Network (abreviated)
tonyrice
0
290
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
320
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
650
Transcript
Go × SIMDで高速化するベクトル検索 ルーフラインモデルでSIMDが効く境界を探れ! Hiromu Nakamura (@po3rin)
Hiromu Nakamura Hiromu Nakamura AI-UX/MLOps TechLead AI/MLOps Engineer. Interested in
Information Retrieval Nagoya Univ ~ Graduate School of Science M3, Inc. AI・ML Team MLOps & Data Engineering po3rin LayerX Inc. AI-UX/MLOps TechLead
1 Accelerating Vector Search with Go and SIMD ワークショップ用Repository https://github.com/po3rin/gocon2026-simd-search
GitHub CodeSpaces だけ先に起動させておきましょう (立ち上げに少し時間がかかるため)。
Accelerating Vector Search with Go and SIMD 1. Introduction
2 Accelerating Vector Search with Go and SIMD Go ×
SIMD ワークショップへようこそ!!!
3 Accelerating Vector Search with Go and SIMD お題: 10万件のベクトル検索を高速化してください
4 Accelerating Vector Search with Go and SIMD ベクトル検索 (1)
5 Accelerating Vector Search with Go and SIMD ベクトル検索 (2)
6 Accelerating Vector Search with Go and SIMD これをGoに入ったSIMDで高速化するぞ!!
Accelerating Vector Search with Go and SIMD 2. What is
SIMD ?
Accelerating Vector Search with Go and SIMD 7 SIMDって何? (1)
内積を普通に書くとこうなります。 fl 1命令で oat32 を1個。これをスカラ処理と呼びます。
8 Accelerating Vector Search with Go and SIMD SIMDって何? (2)
SIMD(Single Instruction, Multiple Data)は、 1 命令で複数のデータを まとめて処理する CPU の機能。 fl 256bit のレジスタには oat32 が 8 個入ります。
9 Accelerating Vector Search with Go and SIMD Go 1.27
の SIMD パッケージ (1) GOEXPERIMENT=simd を付けると simd/archsimd が使えます(実験的機能)。 アセンブリも cgo も書かず、メソッド呼び出しがほぼそのまま 1 つの CPU 命令になりま す。FMA(Fused Multiply-Add)1 命令で 8 要素ぶんが片付きます。
Accelerating Vector Search with Go and SIMD archsimd で覚えることは 3
つ ① 型がデータの形 Float32x8 = oat32 を 8 レーン = 256bit。型を選ぶことが、使う命令幅 とレーン数を選ぶことになる ② メソッド = 1 命令 MulAdd → VFMADD、DotProductPairs → VPMADDWD ③ 実行時にガード 未対応 CPU で呼ぶと SIGILL で落ちる。archsimd.X86.AVX2() などのガー ドで確認してから使う (左が Go のメソッド名、右はコンパイルされて出てくる x86 の機械語の命令名) 対応は amd64、arm64、WebAssembly。 fl 10
11 Accelerating Vector Search with Go and SIMD ポータブルな simd
パッケージ 1.27 で入った simd パッケージは型名からレーン数が消えます (Float32x8 -> Float32s) レーン数は実行時に CPU が決めます。
Accelerating Vector Search with Go and SIMD 3. Accelerating Vector
Search with Go and SIMD
12 Accelerating Vector Search with Go and SIMD SIMD を使えば速くなるとは限らない
😭
13 Accelerating Vector Search with Go and SIMD 例えば、、、メモリ帯域の上限
14 Accelerating Vector Search with Go and SIMD やみくもに SIMD
を足しても、効かないことのほうが多い。 何で詰まっているかを測ることが重要 そのための道具がルーフラインモデル🚗
15 Accelerating Vector Search with Go and SIMD ルーフラインモデル (1)
ルーフ(上の線)がマシンが出せる速度の限界。左がメモリ帯域で決まる斜線、右が演算ピークで決まる水平線。 ルーフはマシンによって決まる。ルーフの計算方法はワークショップに記載。
Accelerating Vector Search with Go and SIMD 16 内積のスカラ全探索はルーフラインモデルでどこか? ベースライン
2.15 GFLOP/s は、メモリ帯域から決まる上限(約 10)にすら届いていない。 算術強度 … メモリから 1 バイト運ぶごとに何回計算するか * 計算:掛け算 1 回 + 足し算 1 回 = 2 op * 運ぶ量:DRAM から運ぶ要素は oat32 なので 4 byte fl fl fl fl 算術強度 = 2 op ÷ 4 byte = 0.5 op/byte
17 Accelerating Vector Search with Go and SIMD SIMDにしてもメモリ律速で止まる!! 全探索は
35.7 ms → 7.9 ms(4.5x)。速くなったがまだ上があるぞ。
18 Accelerating Vector Search with Go and SIMD 演算律速のエリアへ動かす ワークショップでは右上を目指していく!!
Accelerating Vector Search with Go and SIMD 4. Workshop
19 Accelerating Vector Search with Go and SIMD SIMDを動かしてみよう!ルーフラインモデルで高速化してみよう docs/workshop/setup.md
の手順で Codespaces を起動して 教材を動かしてみましょう!!
Accelerating Vector Search with Go and SIMD 4. まとめ
20 Accelerating Vector Search with Go and SIMD 今日学んだこと *
Go + SIMD の使い方。 * ルーフラインモデルの使い方 * (検索の世界の入り口)
21 Accelerating Vector Search with Go and SIMD 「SIMD ってやつを使ってるのに速くならない😭」と諦めず、
計測してボトルネックを突破していく、 そうやって SIMD と仲良くしていきましょう。
Go × SIMDで高速化するベクトル検索 ルーフラインモデルでSIMDが効く境界を探れ! Hiromu Nakamura (@po3rin)