Before the difference between highly optimized code and ok code was maybe 2-3x speedup. Roughly one Moore's law doubling. With heterogeneous computing that is more like 20-30x or more. And Moore's law is dead! This will change a loot in the IT world (More servers are the solution, developer time is more expensive then computer time, etc..). Learn C, down on the metal programming is back, the future is heterogeneous parallel computing.
I would argue that the low level work you are doing should be done in a macro or compiler.
http://www.graphics.stanford.edu/~hanrahan/talks/dsl/dsl1.pd...
http://www.graphics.stanford.edu/~hanrahan/talks/dsl/dsl2.pd...
Pat Hanrahan makes a compelling argument for using special purpose DSLs to construct efficient performant code that takes advantage of heterogeneous hardware.
See the Design of Terra, http://terralang.org/snapl-devito.pdf
I personally really like the idea from the the Halide language, having one language for algo, another for how the computation is done. If something like that could be made general purpose it would be very useful.
>should be done in a macro.. Encourage c programmers to use macros is like encouraging alcoholics to drink :) But I guess you didn't think about pre processor macros.
>...macro
Yeah, I didn't have preprocessor macros in mind. ;*| But wonderful, AST slinging hygienic Macros!
Take a look at http://aparapi.github.io/ it one of the best examples of making OpenCL a first class citizen in Java.