Improving the Efficiency and Robustness of In-Memory Computing in Emerging Technologies