Sorry if this counts as a cross-post, but I have some more information.
I have been using list comprehensions of the form
bar(g, a) = [Pair(x, g) for x in a]
but recently evaluated
foo(g, a) = map(x->Pair(x, g), a)as an alternative.
It turns out that the list comprehension is slower (and, from the code_native, more complex) than the map.
Are these two functions equivalent?