6 ms·
As for 2) totally agree, GPU and FPGA programming has become "the new assembly language". It use to be you could drop from C/C++ to assembler and gain massive
by pheon 10y ago
As for 2) totally agree, GPU and FPGA programming has become "the new assembly language".
It use to be you could drop from C/C++ to assembler and gain massive performance boosts. These days with C intrinsics there`s no need for pure assembly code. But droping to GPU or FPGA code is a total must now, if you need any significant juice from your system.
- pjmlp 10y agoCompiler intrinsics as Assembly replacement go back all the way to the 60s.
- adzm 10y agoBut good codegen from intrinsics goes back only a dozen years or so (ymmv)
- pheon 10y agoPrecisely. Also the instruction sets have been designed for compilers vs minimizing gate counts. Making it easier for compilers to schedule optimally - alot less weird and bizzare shit they have to deal with.
- pjmlp 10y agoWell, we also have to thank C for the set back in optimizing compilers. Fran Allen. In Coders at Work (pp. 501-502): --- Begin Quote --- -Seibel-: When do you think was the last time that you programmed? -Allen-: Oh, it was quite a while ago. I kind of stopped when C came out. That was a big blow. We were making so much good progress on optimizations and transformations. We were getting rid of just one nice problem after another. When C came out, at one of the SIGPLAN compiler conferences, there was a debate between Steve Johnson from Bell Labs, who was supporting C, and one of our people, Bill Harrison, who was working on a project that I had at that time supporting automatic optimization. The nubbin of the debate was Steve's defense of not having to build optimizers anymore because the programmer would take care of it. That it was really a programmer's issue. The motivation for the design of C was three problems they couldn't solve in the high-level languages: One of them was interrupt handling. Another was scheduling resources, taking over the machine and scheduling a process that was in the queue. And a third one was allocating memory. And you couldn't do that from a high-level language. So that was the excuse for C. -Seibel-: Do you think C is a reasonable language if they had restricted its use to operating-system kernels? -Allen-: Oh, yeah. That would have been fine. And, in fact, you need to have something like that, something where experts can really fine-tune without big bottlenecks because those are key problems to solve. By 1960, we had a long list of amazing languages: Lisp, APL, Fortran, COBOL, Algol 60. These are higher-level than C. We have seriously regressed, since C developed. C has destroyed our ability to advance the state of the art in automatic optimization, automatic parallelization, automatic mapping of a high-level language to the machine. This is one of the reasons compilers are... basically not taught much anymore in colleges and universities. --- End Quote ---
- pheon 10y agoah your siding on the lisp machine vs todays hardware arch. I think if the lisp hardware architecture has significant advantages we`ll see that emerging in "soft cpu`s" on fpga`s. Particularly as the Xeon/FPGA gear gathers steam.
- nickpsecurity 10y agoWe've already seen the advantages although the total cost-benefit is unknown. For one, several CPU's for Scheme/LISP in past had hardware-accelerated garbage collection and/or a bunch of cores. Automatic, memory management and multicore are now mainstream due to perceived benefits. Works down to CPU in LISP machines. Also, I've seen some of these benefits of Genera in modern stacks but I still don't have all of these capabilities: http://www.symbolics-dks.com/Genera-why-1.htm http://www.symbolics-dks.com/Genera-why-1.htm Any jump out at you as particularly awesome for a developer OS?
- pjmlp 10y agoNot only Lisp Machines, that was how many memory safe systems programming languages were done in the mainframe days. Intel MPX, CHERI are just two modern approaches of reusing those ideas to tame C's memory issues. Going back to FPGAs, I think function composition is very similar to digital circuit design, so FP concepts could be a very nice way to do GPGPU programming instead of the actual mainstream approaches. But it would require the GPU to be more FPGAs like.
- pjc50 10y agoThat's some serious sour grapes by Allen. Her assertion that Fortran and COBOL are higher level than C is .. difficult to support given the reliance of both languages on GOTO. The assertion that compilers weren't taught any more is just silly.
- pjmlp 10y agoFortran is certainly higher level than C, given lack of aliasing and no decay of arrays into pointers.
- pjmlp 10y agoMight be. ESPOL, NEWP and Algol-68RS are some examples of Algol based systems programming languages where the hardware was fully exposed as intrisincs and no Assembly was required.