The smallest nanowire spectrometers