Poor man's table-based idistance index.