Re: CyrekSoft announcement and "DISCARD"
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Sep 22, 1998
- 599 views
>Ralf's idea was centered on speed while mine was on memory management. I >think that freeing up memory (associated with unnecesary variables) >would help speed as well. I was under the impression, that after the last use of a variable the memory was freed. (well,. it never ever gets friend until ex.exe ends, however, it does free it internally, in other words, make it available for futher use by Euphoria itself only) However, Im not assuming, multiple assignments before a variable is used in an expression, are not discarded. I also did not assume, an assignment to a value, after which it is never used, that ex.exe would skip it. A way around this would for example be, having ex.exe so smart to free variables just after they are used in an expression for the last time. And assignments after that, and multiple assignments in between, can be skipped, off course with the logical side-effects which *do* need to be called. And as to the suggestion of using procedures or using it in -if statement, well... Would we need to make two versions of every function, one discarding the returned value.. (procedure) and what that does completely do the whole calculation and return the result ? And using an -if- statement is the same as assigning/using the value. Im talking about those cases where 1) the actual calculation takes some time 2) we really dont give a *censored* about the result of the calculation. Ralf