You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UInt64 (idx n,int ∗col1 ,chr∗ col2 ,chr∗ col3) {
UInt64 sum = 0;
for (idx i=0; i<n; i++) {
sum += col1[i]∗((100−col2[i])∗(100+col3[i]));
}
return sum;
}
If we can compile the whole expressions using CodeGen + JIT, it will outperform vectorized engine. Because this simple loop fits in CPU cache and there is no memory materialzation for temp result column.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Main IDEA:
Example SQL:
The simple pure c code is:
If we can compile the whole expressions using
CodeGen + JIT
, it will outperform vectorized engine. Because this simple loop fits in CPU cache and there is no memory materialzation for temp result column.Tasks:
Tools:
Beta Was this translation helpful? Give feedback.
All reactions