I have a lookup table in the form of a 2d array and a list of indices (in the form of two 1d arrays xs, ys) at which I would like to evaluate the lookup table. How to accomplish this in a fast manner? 

It looks like a standard problem, however I found nothing about looking up array values at a general list of indices (e.g. not a cartesian product) in the [docs](http://julia.readthedocs.org/en/latest/manual/arrays/#indexing). I tried 

```
result = zeros((10^6,))
for i in [1:10^6]
    x = xs[i]
    y = ys[i]
    result[i] = lookup[x, y]
end

```

Besides looking a bit cumbersome, this code is also 10 times slower then an equivalent numpy code. Also it looks like a standard problem, however I found nothing about looking up array values at a general list of indices (e.g. not a cartesian product) in the [docs](http://julia.readthedocs.org/en/latest/manual/arrays/#indexing). 

So what would be a fast alternative to the above code?