As suggested by https://stackoverflow.com/users/4208174/jonathan-dodds, and by How to get devenv.exe to display its output on the console the command that best worked for me is:
devenv.com my.sln /Build Release /Project my_project
The build time is close to that in VS