5. DB業界におけるLLVMの利活用
• SQLによる関係代数の処理をLLVM-‐JITで改善
– 既存DBのSQL処理系*1は冗長的で非効率
*1SQLコンパイラとSQL実行エンジンのこと
Thomas Neumann, Efficiently Compiling Efficient Query Plans for
Modern Hardware, Proc. of VLDB’11
5
36. WriQng
Vectorizer-‐Friendly
Code
in
clang
• example.4#
– clang
-‐O3
-‐mllvm
-‐vectorize-‐loops
float test4(float * __restrict__ a, int n) {
float S = 0.0;
for (int i = 0; i n; i += 1)
S += a[i];
return S;
}
36