Approaches for improving the performance of filament-type resistive switching memory