4 ms·
I'm still enthused about GCC!!! :) When I started using it, The alternatives were expensive. Even the educational version of Borland our university used was ex
by chisleu 12y ago
I'm still enthused about GCC!!! :)
When I started using it, The alternatives were expensive. Even the educational version of Borland our university used was expensive (The mediocre book it came with was ~$300!!!)
It isn't as performant or as well tested as professional compilers (that cost tens of thousands or more!) You wouldn't expect it to be, would you?
- jordigh 12y ago> You wouldn't expect it to be, would you? Yes I would, especially since it's often made by the same people (Intel, IBM, Google)... No reason to not keep improving gcc!
- chisleu 12y agoThere is no reason to expect a product with $100M spent in testing by some of the highest paid mathematics and software engineers in the world to keep up with free software? I say that is wrong. We should expect it to be better, and it is. The intel compiler is faster than GCC on Intel hardware and it always will be. Why? Because GCC can't keep up with the new hardware that comes out. Proprietary compilers have always had the upper hand because incredibly complicated optimizations are incredibly hard to reverse engineer.
- jordigh 12y ago> There is no reason to expect a product with $100M spent in testing by some of the highest paid mathematics and software engineers in the world to keep up with free software? Are you aware that gcc has probably just as much if not more money poured into it? It's not a product of a bunch of hobbyists. Most of the gcc code is done by contributors who are paid to work on gcc. A lot of it is done precisely by companies who are interested in gcc generating the right code for niche hardware.
- Alupis 12y ago> t isn't as performant or as well tested as professional compilers I don't know how true this statement is. ICC has been found to be very lacking compared to both gcc and clang -- and I'd wager in-house testing doesn't compare to massive world-wide deployment of gcc and clang as far as rooting out tough bugs that crop up in weird circumstances.
- michael_h 12y ago> ICC has been found to be very lacking compared to both gcc and clang Who found that? For processing intensive tasks, I routinely get a 30% reduction in run time using ICC - mainly owing to ICC's aggressive vectorization. Rarely, I'll have to do some shenanigans to force it to work correctly. Very rarely. I use clang when developing because the error messages are miles ahead of anybody else, then produce a 'stable' GCC version and an ICC version. If the ICC version produces the same results as the GCC version for the test suite, I exclusively use the ICC version.
- Joky 12y ago"processing intensive tasks" may not be the one to expose all the corner cases of C and C++?
- gh02t 12y agoIn my experience, `icc/pc` and `ifort` give a significant speed boost for numerical code (on Intel hardware at least), but for more general purpose code it's not really very impressive. However, the related products like `ipp` and `mkl` are where Intel has a real advantage. My experience has been that `mkl` in particular is dramatically faster than vanilla LAPACK and friends and still quite a bit faster than more optimized variants like ATLAS. But, you don't need to use the Intel compilers to use those libraries, you can use them with gcc as well.
- chisleu 12y agoMy professor in college made the statement and his class said "oh yeah right GCC is everywhere". He spent the break writing tests for GCC and found errors in it's parse tree. He submitted bugs and patches cause good guy coder.
- pjc50 12y agoI think gcc is in some ways more tested than professional compilers given the huge range of code thrown at it. It can fall down in performance on workloads that things like ICC are tuned for, but performance is nearly always structural rather than micro-optimisable.
- sounds 12y agoTo be fair, the micro-optimizations are nice, and being able to just throw a switch and turn them on is nice. Of course you're right that a compiler is "never" (boy, prove me wrong, then shut up and take my money!) going to convert Array-of-Structs to Struct-of-Arrays code, for example.
- orodley 12y agoJonathan Blow is doing some very exciting stuff in this area with his new language. Check out his latest talk on YouTube about data-oriented programming.
- sanxiyn 12y agoFYI, LLVM was a byproduct of Chris Lattner's PhD thesis titled "Macroscopic Data Structure Analysis and Optimization", which aimed to do exactly that. It is still a great paper. Alas, it was found that doing the basics well is much harder and larger task than doing the proof of concept of very clever optimizations.
- Theodores 12y agoI was fortunate to be well supplied by government science departments with workstations of many flavours (DEC Ultrix, IBM AIX, SGI Irix, Sun 'Suntools', VMS). Due to these machines being setup the same way by some nice kind civil servants somewhere in England there was always a compiler on there with a few bookshelves of printed manual not far away. I grew up with that expectation. Imagine my shock when I properly made it into the real world and realised that all of these machines were useless without their government-special software suites. This I did not entirely mind at the time as this kept the barriers to entry up meaning that my skills and experience were of value, purely because they were gleaned from the privilege of having access to software and hardware beyond the affordable. Nowadays I only use free open source software and this is how I like it. The idea of having to go through the hassle of licensing software and typing codes carefully into a screen does not do it for me. I am glad I don't have 2-3 hardware dongles on the printer port(!) of my Chromebook. Instead I have Ubuntu. Needless to say I don't compile often, if at all, however, to not have that feature would be a problem for me.