Efficient Brains for Digital Medicine: Memory-Centric Optimization of CNNs and SNNs Using