On Nov 12, 5:43 pm, Santiago Romero <srom...@gmail.com> wrote:
> Is there a Python version of C's language #define statements?
>
> Example:
>
> #define ReadMem( (x) )    memory[ (x) ]
>
>  Instead of using a function, when you call to ReadMem(), the code is
> INCLUDED, (no function is called, the "compiler" just substitues the
> ReadMem( expression ) with memory[ (expression) ] .
>
>  I want to avoid function calls to speed up a program by sacrifizing
> the resulting size ...
>
>  Is that possible?

Python is a slow language and people usually do not even think of such
micro-optimizations.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to