hello,
i need to optimise some scheme code i wrote.
I can do that by "inlining macro expansion" and in other case by doing both and substituing procedure symbolic result instead of re-calculus all the numeric values at each step of loop for example.
About macros my question with Racket is :
if a macro is expanding to a result, is it done before computation only one time in the code execution ,at beginning, or is it done each time (for example in a loop) the macro call is encountered?
it changes a lot, if it is done first, i have no need of optimise that, execept for macro that call a procedure that can be symbolically optimise! that another case too...
example of the general case:
{x <+ 7}
is expanded by SRFI 105 reader as:
(<+ x 7)
this is done before execution by Raket SRFI-105 curly infix reader
now
the above expression is expanded as:
(define x 7)
by evaluation of <+ macro but if (<+ x 7) is in a loop is it expanded at each iteration of the loop or as it been done definitively at start of the program?
note : for <+ this is a simple case but i have case more complex (macro evaluating to procedure calls)