Improve performance by ommitting calculating factors if similar factor combination has already been visited