ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> exslt
exslt
Re: RE : Re: [exslt] Re: Function memoization
by Colin Paul Adams other posts by this author
Jul 14 2006 4:12AM messages near this date
[exslt] http://www.exslt.com/dev/wiki exslt dev relaunched | Re: [exslt] Re: Function memoization
& XSLT > >>>> "Florent" == Florent Georges <darkman_spam@[...].fr> writes:

    Colin>  This is no good. That means two functions calls that pass the
    Colin>  value 3 will not (usually) be memoized.

    Florent>    Maybe it would make sense to say:

    Florent>      - if the argument is an atomic item (or a sequence of
    Florent>  1 such item, as these are indistinguishable), compare by
    Florent>  value (string() or data()?);

Good.

    Florent>      - if the argument is a node, compare with the "is"
    Florent>  operator;

Good.

    Florent>      - else (so if it is a sequence of at least 2 items),
    Florent>  compare by identity (the two sequences must be the same
    Florent>  one).  I think such a "sequence identity" doesn't exist
    Florent>  in the CRs.

Re-formulate that as compare each item of the sequence of identity as
determined above.

    Colin>  Now if long strings are being passed as arguments, then indeed
    Colin>  the cost of recognizinf them may be less than the cost of
    Colin>  running a small function.

    Florent>    This is the /raison d'être/ of this extension.  The
    Florent>  implementation doesn't have to guess itself where to use
    Florent>  memoization, the developer will tell it that.

    Florent>    Does it make sense?

I guess you are right. If the developer makes a bad decision - tough.

It's analogous to xsl:key.





























	

	
		
    Florent>  ___________________________________________________________________________
    Florent>  Yahoo! Mail réinvente le mail ! Découvrez le
    Florent>  nouveau Yahoo! Mail et son interface révolutionnaire.
    Florent>  http://fr.mail.yahoo.com


-- 
Colin Adams
Preston Lancashire
_______________________________________________
exslt mailing list
list@[...].org
http://www.exslt.org/list
Thread:
Dimitre Novatchev
Colin Paul Adams
Dimitre Novatchev
Dimitre Novatchev
Colin Paul Adams
Florent Georges
James Fuller
Colin Paul Adams
Florent Georges
Dimitre Novatchev
Florent Georges
Dimitre Novatchev
Florent Georges
Dimitre Novatchev
Colin Paul Adams
Frans Englich
Florent Georges

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved