GCC and static analysis
Posted Apr 21, 2012 22:45 UTC (Sat) by
khim (subscriber, #9252)
In reply to:
GCC and static analysis by neilbrown
Parent article:
GCC and static analysis
Most programming really is fairly boring single threaded stuff.
Not really. Most programs need to deal with bazillion things simultaneously. Mouse, network, computations (even if they are simple they don't happen in zero time). Heck, even simple parse of the config takes unpredictable time because you need to find said config somewhere on slow HDD first (SSD is faster but still many times slower then CPU). Contemporary systems include bazillion tricks which make single-threaded programs somewhat acceptable (insanely fast CPUs and multitude of “transparent” caches are primary solution… but as I've said we've hit the wall there).
Of course when you've created all that it makes no sense to try to use functional programming in this environment: it does not really fit! The fact that all these “transparent accelerators” are not needed does not help you to produce the result faster and you need to hire more knowledgeable, more expensive programmers!
I've always thought that functional languages are great for writing interesting algorithms but just didn't make sense for writing complete applications.
On the existing hardware, sure, it makes no sense. But I'm not so sure it'll be true in 10, 20, or 30 years time. We've hit the wall with CPUs about 10 years ago. I think we'll hit similar wall WRT memory soon. It'll be interesting to see how long we'll be able to pretend that programs which utilize our systems by 1% of the capability or so are exactly what we need.
(
Log in to post comments)