On 7/28/06, Charles Vaughn <[EMAIL PROTECTED]> wrote:
I'm looking for a way of modifying the compiler to eliminate any loops and recursion from code.  It's for a high speed data processing application.  The alternative is a custom language that is little more than gloryfied assembly.  I'd like to be able to use everything else around Python, but we can't allow the users to create more than O(1) complexity.

Well, the problem is how are you going to infer how many times to unroll the loop?  range() and xrange() can change since they are only built-ins.  You would need type inference on some locally defined variable that was set to a syntactically defined atomic type in order to know the proper number of times to unroll the loop and that might not work for your needs (on top of being a pain to write out a list with however many values you want to have the loop iterate over).

-Brett
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to