3 ms·
https://godbolt.org/z/MTo11voes https://godbolt.org/z/MTo11voes > println takes 9 seconds https://godbolt.org/z/he6Phr7nG https://godbolt.org/z/he6Phr7nG > cout
by bangaladore 2y ago
https://godbolt.org/z/MTo11voes https://godbolt.org/z/MTo11voes > println takes 9 seconds
https://godbolt.org/z/he6Phr7nG https://godbolt.org/z/he6Phr7nG > cout takes 6 seconds
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.
- nicce 2y ago> https://godbolt.org/z/MTo11voes https://godbolt.org/z/MTo11voes > println takes 9 seconds https://godbolt.org/z/he6Phr7nG https://godbolt.org/z/he6Phr7nG > cout takes 6 seconds That is 50% increase.
- bangaladore 2y agoI don't believe I claimed anywhere it is not a 50% increase. The OC said 30 second difference.
- nicce 2y agoI 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.
- bangaladore 2y agoIt is not linear on number or prints. 1 vs 2 prints will likely have zero noticeable affect.