Faster mode by iterating over table - yay

Explicitly inline loop for speed - because of some Cython issue where
inlined function (or separate function) that iterates over ndarray will
not be as fast as manually inlining the loop [i.e., on an array of 100K
entries, 2x faster to manually inline (~1.5ms vs. 3ms)] so worth the
boilerplate. Candidate for generate code though.