Re: Re: Function memoization
Colin Paul Adams <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Dimitre" == Dimitre Novatchev <[email protected]> writes: Dimitre> Subject: Re: Function memoization To: Dimitre> [email protected] >> If the function is called again with the same values for the >> arguments, it MUST return the remembered result. It MUST NOT >> re-execute the function body, as this can cause different >> results in some cases. Dimitre> We must define well what "the same values for the Dimitre> arguments" means. Dimitre> It is impractical to remember and compare long sequences Dimitre> -- this may require excessive amounts of memory and may Dimitre> lead to slower execution than without any memoisation. Dimitre> I have discussed this problem with Michael Kay before. A Dimitre> compromise we agreed upon was not to memorize every Dimitre> sequence-argument but just the ID of Dimitre> the sequence. What do you mean by the ID? -- Colin Adams Preston Lancashire