Re:I Do Not Know C: Short quiz on undefined behavior (2015)
by dbaupp on Monday February 13, 2017 @09:56PM
(#13640807)
Optimisers are what made C what it is: they convert the idealised PDP-11 assembly into something efficient on modern computers, and speed is something C programmers care about.
[ Parent
| on HN ]
Re:I Do Not Know C: Short quiz on undefined behavior (2015)
by ArkyBeagle on Monday February 13, 2017 @10:39PM
(#13640963)
In the large, no, they don't care about the 90-95% of the code base that's not performance critical. And these days, the stuff that is critical will be #ifdef and asm(...) stew.
I can't tell you how many projects I have been on where disabling optimization made no measurable difference in performance.
This being said, I cannot speak for game devs nor video device driver developers.
Re:I Do Not Know C: Short quiz on undefined behavior (2015)
by E6300 on Monday February 13, 2017 @11:11PM
(#13641071)
I have to say, I have never encountered a program where compiling without optimizations made no difference. If you have seen that, then I would agree that C was a very, very poor choice for that particular domain.
Re:I Do Not Know C: Short quiz on undefined behavior (2015)
by ArkyBeagle on Wednesday February 15, 2017 @02:23AM
(#13650334)
It made no measurable difference. The acceptance criteria for the system were not materially affected. Since the optimization did not improve the performance by that, it was generally set one way ( mostly off ) and let that way.
Teams I'm on have written some tight - but readable -code, too. Well-architected, low-latency, low-jitter.
Re:I Do Not Know C: Short quiz on undefined behavior (2015)
by pjmlp on Tuesday February 14, 2017 @02:16AM
(#13641846)
Business applications, as it was common in the 90's.
Witting them in C or VB made no difference for the guys sitting at the desk.
Re:I Do Not Know C: Short quiz on undefined behavior (2015)
by ArkyBeagle on Wednesday February 15, 2017 @02:26AM
(#13650350)
This ranged from networking equipment to phone switches to equipment control. Most of it was bare metal.
I've never written a business application in my life.
Re:I Do Not Know C: Short quiz on undefined behavior (2015)
by adrianN on Tuesday February 14, 2017 @04:39AM
(#13642386)
You can try an experiment and build an application like Firefox from source with disabled optimizations. I bet you'll notice a massive difference.
Even more important are things that run in datacenters on thousands and thousands of machines. Even if you suppose that optimizations make only a minuscule difference on the scale of today's infrastructure 5% fewer machines can save huge amounts of electricity.
Re:I Do Not Know C: Short quiz on undefined behavior (2015)
by ArkyBeagle on Wednesday February 15, 2017 @02:28AM
(#13650358)
Why would I want to build Firefox from source? I don't build things that run on thousands of machines. Last thing I ran any code on had a 2500 HP diesel; the electronics were in the noise.