Op 09-Oct-16 om 7:50 PM schreef smplx: > The piclist seems very quite regarding PIC topics lately so I thought I'd > try to add something interesting. > > Before we get bogged down into which is better assembler or high level > language consider how you would feel about a compiler that generates code > that is optimised beyond your wildest dreams. > > Imagin that you don't need to resort to sneaky tricks or hand crafted > assembler embedded in your high level code. That you don't need to > labouriously generate complicated tables in excel or matlab and then > painstakingly shoehorn them into you high level code. Imagin that you can > execute thousands of lines of complex code and have the result available > in the time it takes to execute a single machine cycle. And better still, > imagin you can do all this without having to learn some new complicated > language. > > Basically it comes down to this: the compiler executes as much user code > as possible during the compilation process and works out the bare minimum > that needs to be executed in the target. Are you aware that this is a feature of C++? It was available for a long=20 time in a rather convoluted form as meta-programming (templates and=20 SFINAE), extended to plain functions in a limited form in C++ 11=20 (single-return-statement functions only), which was generalized in C++ 14. I don't fully get what you proposed, but in C++ you can use constexpr auto x =3D y( ... ); which requires that y(...) is evaluated at compile time. Y can be a=20 function, or an object constructor that creates a complex object. Wouter "Objects? No Thanks!" van Ooijen --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .