PERF: Rewrite assign_candidates() for speed.
Merge pull request #76 from nkeim/batch-assign

PERF: Rewrite assign_candidates() for speed.