Use columns hash

I think we should prefer hash lookup over array iteration.