From: Robert Feldt Date: 2004-04-24T09:36:39+09:00 Subject: Re: Psyco Jean-Hugues ROBERT wrote: > At 06:07 24/04/2004 +0900, you wrote: > >> Interesting stuff for Python, is any work like this being done in Ruby? >> http://psyco.sourceforge.net/introduction.html >> Jim Moy > > > Impressive ! > > They could produce better code (less memory overhead) if Python's > syntax was expanded so that user could provide "hints" about what > deserves to be optimized. Today they suggest profiling as an > heuristic. > > There was a time when C compilers had #pragma register, whereby > users worried about speed could help the compiler produce faster > code (when you need speed, you need it hard). > > Better have some user directed optimizations than nothing. > Maybe, but first you should do static type inference as much as you can, see http://www.python.org/pycon/dc2004/papers/1/paper.pdf and if you then want to give hints there is no need to extend the syntax; simply add a private method on Module for attaching type hints to methods etc. I think the StarKiller has some kind of type annotation language like that. But speed may not be very important anyway... ;) Regards, Robert