compiler question: why bsd disowned BSD's C? Gcc, and clang

Well Fabrice Bellard for sure is the closest thing to a human being with super programming powers we'll probably ever know. I mean, all the stuff he wrote - Qemu, TCC, FFMPEG, QuickJS, computing Pi quickly, BPG, creating a DVB-T emitter with a standard PC and VGA card and many others - wow. A resume to die for!

Fun fact about the TCC is that it started life as entry for the IOCCC back in 2002. The TCC was then later derived from it.

BTW reg. Portland Group: they've been sold to Nvidia. And it's new brand name is nowadays NVIDIA HPC SDK.
 
Like bitcoin mining farms? That's about the best case scenario I can think of. 😩
I thought crypto mining is today done with ASICs, since CPUs and GPUs can't keep up in energy efficiency. Someone told me that mining Bitcoin using commercial power and ASICs has negative efficiency in most parts of the world, since you pay more for the kilowatts required than the resulting bitcoin sells for, and with CPUs it's hopeless. For other (less commonly used) cryptocurrencies, that may not be true. But the answer to this is to move to areas where power is either extremely cheap (for example due to lack of environmental regulations on coal), or where one can use crime or political connections to get free power. Supposedly that's the case in parts of the former Soviet Union and North Korea, where state-sponsored crypto mining gets free electricity, and the state gets a share of the cryptocurrency.

Another form of mining is to be a criminal: Just don't pay for computer power, and steal it. Rumor has it that the hosting- and cloud providers are having big problems with "customers" using free trial accounts and fake credit cards to buy computer power, using it to mine, and not paying their bills. I have not heard whether hackers are breaking into everyday computers and using background cycles to mine, but that sounds like another approach.

In all these cases, a few percent improvement in efficiency of the generated code that runs on mainstream CPUs is not the big issue ... the big issue is arrangements with politicians and avoiding law enforcement.

Where efficient compilers matter is for example two areas. The obvious one is supercomputers: if a government agency, university or company pays dozens or hundreds of M$ for a computer, they are keenly interested in making it run a few percent faster, since that translates into significant $ savings. The second one is the big hyperscalers (FAANG + friends, in particular the cloud providers): they spend billions on compute power, and compete with each other with razor-thin margins, so a few percent improvement can be make or break.
 
I thought crypto mining is today done with ASICs, since CPUs and GPUs can't keep up in energy efficiency. Someone told me that mining Bitcoin using commercial power and ASICs has negative efficiency in most parts of the world, since you pay more for the kilowatts required than the resulting bitcoin sells for, and with CPUs it's hopeless. For other (less commonly used) cryptocurrencies, that may not be true. But the answer to this is to move to areas where power is either extremely cheap (for example due to lack of environmental regulations on coal), or where one can use crime or political connections to get free power. Supposedly that's the case in parts of the former Soviet Union and North Korea, where state-sponsored crypto mining gets free electricity, and the state gets a share of the cryptocurrency.

Another form of mining is to be a criminal: Just don't pay for computer power, and steal it. Rumor has it that the hosting- and cloud providers are having big problems with "customers" using free trial accounts and fake credit cards to buy computer power, using it to mine, and not paying their bills. I have not heard whether hackers are breaking into everyday computers and using background cycles to mine, but that sounds like another approach.

In all these cases, a few percent improvement in efficiency of the generated code that runs on mainstream CPUs is not the big issue ... the big issue is arrangements with politicians and avoiding law enforcement.

Where efficient compilers matter is for example two areas. The obvious one is supercomputers: if a government agency, university or company pays dozens or hundreds of M$ for a computer, they are keenly interested in making it run a few percent faster, since that translates into significant $ savings. The second one is the big hyperscalers (FAANG + friends, in particular the cloud providers): they spend billions on compute power, and compete with each other with razor-thin margins, so a few percent improvement can be make or break.
Unfortunately, Chinese bitcoin mining farms did contribute to the global GPU shortage crisis already. If the GPU's were actually useless for crypto, the crypto farmers would have caught on to that by now, and would be chasing after a different hot new miner to buy up. 😩

And yes, hackers are trying to use the everyday computers to mine: Just a few years ago, Piratebay tried that. I wouldn't put it past determined hackers to keep trying that even these days.
 
Which brings me to this related question. Are there interesting c compilers other than clang/llvm & gcc i should try on freebsd ?
I found : ucc,tcc,sdcc,pcc,nwcc,flatcc,bcc
Probably not what you want but in case you want to learn more about recursive descent compilers, I’d recommend reading the code of Nils Holm’s subc compiler (for a major subset of C) & the book about it. The compiler code is about 5K lines of clear code & compiles itself in under 0.2 seconds on a Ryzen machine! The code is in public domain. The book you have to buy from lulu.com (but the code is readable on its own). The current version of subc has evolved from the book version (originally developed on FreeBSD) and now supports x86, x86-64 & arm backends on a number of platforms. It may also serve as a decent platform to try out your own ideas about extending/restricting C etc.
 
Unfortunately, Chinese bitcoin mining farms did contribute to the global GPU shortage crisis already. If the GPU's were actually useless for crypto, the crypto farmers would have caught on to that by now, and would be chasing after a different hot new miner to buy up. 😩

And yes, hackers are trying to use the everyday computers to mine: Just a few years ago, Piratebay tried that. I wouldn't put it past determined hackers to keep trying that even these days.
Well since PRC banned crypto mining, the USA have taken over the helm as global mining heaven.
 
Back
Top