One of the performance difficulties from interpreting a vector language is the accumulated temporaries. Consider:

y = 7 * x + 13

There are two different vector arithmetic operations here; an eager evaluation will perform the multiplication and then the addition. We can visualize this using the assembly language from Empirical’s Vector Virtual Machine:

mul_i64v_i64v  7 %1 %2      ; "x" is %1
add_i64v_i64v %2 13 %3      ; "y" is %3

The VVM interpreter will execute each instruction using the equivalent C++ code:

std::vector<int64_t> temp(x.size());
for (size_t i = 0; i < x.size(); i++) {
temp[i] = 7 * x[i];
}

y.resize(temp.size());
for (size_t i = 0; i...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help