I just submitted my patch to remove calls (exec()ing) to basename/dirname in bsd.port.mk to GNATS. I didn’t time if this improves anything, but I assume doing a regex replacement in a make-variable uses less resources than doing a fork()&exec() or a system() call.
I don’t think this gives a huge improvement at all, it’s maybe even below the measurement threshold, but hey, why using external tools if the internal features are enough to do what you want? At least this patch is recorded now somewhere…