Re: The Mill: a new low-power, high-performance CPU design
Posted: Sat Mar 15, 2014 9:05 am
Well yeah again, it's not about the ability of the program to do it. You could program a crysis engine in Qbasic or javascript. It would just be super slow. Or then much more bothering to write optimized code.
With GLSL you have neither of those inconvenient, the synthaxe is clear and neat, and it make it easy and even explicit for the compiler generate code optimized for simd capable cpu. With a very clear and straight forward synthaxe.
I'm not saying GLSL could replace entierely C or Java, it still lack many feature to be a complete language, it's not even supposed to be a turing complete language, but it's designed to make vectorization/paralelization easy and obvious.
But yes again you could code integer addition as a array of 32 bool and code addition manually, or make crysis engine in qbasic. It's not really the question of the ability of the language to do it, those stuff have been around for very long time, and there is not specially need for anything specific in the language to program it. Unless some language will be 10 times slower for the same thing.
What is less portable is to have the compiler to generate the most optimized code for any cpu or plateform without you have to give a single **** about putting a pragma or a annotation for the specific cpu or the specific kind of build you want. You just say the compiler i want this code compiler for ARM , intel, or anything else, optimized for size or speed, using call to the runtime or instrinsic/inlining, using this set of instruction or not. Or even ability to use specific code path at runtime for the specific version of the cpu with the runtime. Without you have to write a single line of additional code for any specific plateform. Because the langue already define the behavior that a function has, and the compiler already know how this function or behavior can be optimized for the target plateform.
With GLSL you have neither of those inconvenient, the synthaxe is clear and neat, and it make it easy and even explicit for the compiler generate code optimized for simd capable cpu. With a very clear and straight forward synthaxe.
I'm not saying GLSL could replace entierely C or Java, it still lack many feature to be a complete language, it's not even supposed to be a turing complete language, but it's designed to make vectorization/paralelization easy and obvious.
But yes again you could code integer addition as a array of 32 bool and code addition manually, or make crysis engine in qbasic. It's not really the question of the ability of the language to do it, those stuff have been around for very long time, and there is not specially need for anything specific in the language to program it. Unless some language will be 10 times slower for the same thing.
What is less portable is to have the compiler to generate the most optimized code for any cpu or plateform without you have to give a single **** about putting a pragma or a annotation for the specific cpu or the specific kind of build you want. You just say the compiler i want this code compiler for ARM , intel, or anything else, optimized for size or speed, using call to the runtime or instrinsic/inlining, using this set of instruction or not. Or even ability to use specific code path at runtime for the specific version of the cpu with the runtime. Without you have to write a single line of additional code for any specific plateform. Because the langue already define the behavior that a function has, and the compiler already know how this function or behavior can be optimized for the target plateform.