Combating Randomness: Towards Efficient Data-Intensive Applications Using Software-Hardware Co-Design