The potential of terabit-per-second fibre optics can be unlocked with emerging all-optical networks and processors employing all-optical switching. To be effective, all-optical switching must support operations with femtojoule switching energies and femtosecond switching times. With this in mind, this work studies geometrical and material characteristics for all-optical switching and develops a new all-optical switching architecture. A nanojet focal geometry is applied, in the form of dielectric spheres, to direct high-intensity photonic nanojets into peripheral semiconductors. Theoretical and experimental analyses demonstrate photonic nanojets, enabling femtojoule switching energies through localized photoinjection, and semiconductor nanoparticles, enabling femtosecond switching times through localized recombination.