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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
po3rin
September 11, 2026
Programming
6.2k
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
560
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
2.4k
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
1.6k
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
540
嗚呼、当時の本番環境の状態で AI Agentを再評価したいなぁ...
po3rin
0
630
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.3k
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
1.3k
Other Decks in Programming
See All in Programming
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
130
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
360
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.1k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
470
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
480
パーソナライズPodcastを作った話
repunit11
0
120
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
150
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
440
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
120
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
440
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.5k
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
190
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
600
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
540
Optimizing for Happiness
mojombo
378
71k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
310
Amusing Abliteration
ianozsvald
1
330
Typedesign – Prime Four
hannesfritz
42
3.2k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
350
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)