Subsample perf

NOT READY FOR MERGE

Addresses #531 partially. This change resulted in ~10% reduction in runtime. I'm currently unable to profile the cython code for whatever reason, so going about optimization blind. Would be good to squeeze out more. 


Subsampling doesn't work unless the table contains integers, right?

The same assumption was being made previously but maybe we should raise an error if casting hasn't preserved values?