On Mon, Oct 14, 2013 at 5:31 PM, Albert Abramson <abramson.alb...@gmail.com> wrote: > > Is there a language out there (similar to Fortran or a dialect of C) > that doesn't inhibit the compiler from taking advantage of every > optimization possible?
Sure: Fortran. > Is there some way to provide a C/C++ compiler > with extra information about variables and programs so that it can > maximize performance or minimize size? For example: > > int age = 21; //[0, 150) setting maximum limits, compiler could use byte > int > int outsideTemp = 20; //[-273, 80] > float ERA = 297; //[0, 1000, 3] [min, max, digits of > accuracy needed] Hmmm, OK, that kind of thing is available in PL/1 and, I think, in Ada. But as far as I know it doesn't help compilers very much in practice. Ian