Locating missing items in two sequences - 1000

The problem is to detect which values in sequence source are missing from target. Although the test data is small, this algorithm may be required for sequences thousands of items long (170,000 in the case of IATI)
A larger test set restricted to the O(N) algorithms
Source Target Index Configuration

1. Setup test data

The test data is regenerated and stored in an indexed document in the DB

2. Setup test data

Here the sequence of values is saved to the db, indexed on value

3. in memory :$target[value=$item]

Loop through Sequence A, lookup in sequence B.

4. in memory :$target[*=$item]

Loop through Sequence A, lookup in sequence B. predicate format

5. db: $target/* =$item

Loop through Sequence A, lookup in sequence B, both in db

6. db: $item = $target/*

Loop through Sequence A, lookup in sequence B, both in db

7. db: $target[*=$item]

Loop through Sequence A, lookup in sequence B, both in db

8. db: $target[value=$item]

Loop through Sequence A, lookup in sequence B, both in db

9. lookup-index-2v - name

Loop through Sequence A, lookup in sequence B, both in db

10. $source[not(. = $target)]

without looping

11. except - fails

source except target - but this works on node identity not node value, so returns $source

12. map

construct a map using the target and loop through the source