Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
po3rin
September 11, 2026
Programming
6.3k
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
570
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
2.4k
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
1.6k
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
550
嗚呼、当時の本番環境の状態で AI Agentを再評価したいなぁ...
po3rin
0
640
Temporal Knowledge Graphで作る! 時間変化するナレッジを扱うAI Agentの世界
po3rin
7
2.5k
自作LLM Native GORM Pluginで実現する AI Agentバックテスト基盤構築
po3rin
2
1.2k
麻雀点数計算問題生成タスクから学ぶ Single Agentの限界と Agentic Workflowの底力
po3rin
5
3.3k
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
1.3k
Other Decks in Programming
See All in Programming
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
330
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.2k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
180
Event is what happens
moro
2
940
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
170
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
290
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
760
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
760
Mobile First: as difficult as doing things right
swwweet
225
10k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Unsuck your backbone
ammeep
672
58k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Practical Orchestrator
shlominoach
192
12k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
Making the Leap to Tech Lead
cromwellryan
135
10k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
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)