Accelerating numerical methods for gradient-based photonic optimization and novel plasmonic functionalities