No, there is no faster way than using remove()- or unlink()on POSIX systems - in a loop.
The system rmdoes this too - at least in the simple non-recursive case where the names are specified on the command line. The shell expands the metacharacters, and rm(in) coolly continues to delete what was said to be deleted, unaware of the catastrophic notation *.*that was used on the command line. (In the recursive case, it uses a function such as nftw()to traverse the directory structure in order of depth and recall on unlink(), to delete files and rmdir()to delete (now-empty) directories.)
POSIX provides functions ( glob()and wordexp()) for creating lists of file names from the metacharacters used in the shell (POSIX), plus fnmatch()to find out if the name matches the pattern.