This can concatenate PDFs (source):
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf
but it's slow when concatenating hundreds of PDFs.
Is there a way to parallelize PDF concatenation, such as by using GNU Parallel somehow?