On Mar 15, 2008, at 2:25 AM, Dag Sverre Seljebotn wrote: > http://wiki.cython.org/enhancements/inlining > > As I think this is possible in a one or two week timeframe, I ask > of you > all to tell me what obvious things I am missing completely and > where I did > a wrong turn in my reasoning :-) > > I copy and paste: > > Why? > > - It leaves the way open for a hassle-free operator overloading > syntax - > use the same operator overloading conventions that Python use even for > wrapped C library types without worrying about performance.
More comments on this in a separate email. > - A convenient tool for doing compile-time calculations and having > parametrized code written at compile-time. The creative use C++'s > template > syntax has gotten over the years should demonstrate that the > inlining the > GCC compiler does is not sufficient for advanced use cases (see > http://ubiety.uwaterloo.ca/~tveldhui/papers/Expression-Templates/ > exprtmpl.html, > Blitz++ etc., basically using the C++ template system to inline vector > multiplications etc. that's written dynamically according to vector > sizes). This mostly seems to be a proposal for compile-time calculations, and says very little about inlining and loop unrolling. I think compile- time calculations are a valuable optimization, but I think inlining (which one can explicitly request in the C output) and loop unrolling are well handled by GCC and is probably best handled at the this level for most things (for now at least). Keeping track of the contents of variables (e.g. has a variable been initialized, set to a certain value, within a certain range) would be very useful for getting rid of a lot of checks (especially if we want to raise LocalVariableErrors rather than treating all uninitialized variables as None). - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
