A specially designed tap for fast threading
This tap can only be used in CNC machines, where with high precision and force, the tap is pushed down into a pre-drilled hole with a rotary motion , which results in two helical grooves forming along the sides of the hole. Then the tap is rotated half a turn  to cut out the threads and then retracted/rotated  so that the cutter again follows the helical grooves.
The method is very fast but does not fit all applications/material as the threads created are not continuous.
Spiral shaped outer or inner grooves are usually used for fitting