What machine / compiler are you on where the difference between these are 30 seconds? GCC is also quite a bit faster based off a quick tests in godbolt.
I missed the "Hello, world!" mention, but otherwise you only need to have 10 prints in your whole project to have the 30 second increase. That is pretty significant.
That is 50% increase.