edx/ease — pull request #59 by wedaly (2014-06-23 13:15:13+00:00)
Title: Use a set instead of a list for good ngram lookup

When finding grammar errors, EASE checks whether each ngram in the submission is in a list called `good_pos_ngrams`. This is an O(n) operation that occurs for each ngram in the submission.

By changing the `list` to a `set`, the `in` operation is O(1) in the average case, which results in a pretty dramatic speedup. When I profiled the algorithm on my laptop, I saw an improvement of about 71%.

@stephensanchez Please review. I'd like to get this in and re-run the perf test on dev.