Re: question about last call optimization
- From: "Nameless" <news.mail@xxxxxxxxx>
- Date: Fri, 5 Aug 2005 17:04:30 +0200
"Joachim Schimpf" <j.schimpf@xxxxxxxxxxxxxx> wrote in message
news:dcvir2$lfe$1@xxxxxxxxxxxxxxxxxxx
> Nameless wrote:
>>
>> Ok, but does this explain why there is up to 50% increase
>> in execution time vis-a-vis clauses with cuts?
>
> The variants which are comparable are test2 and test3 (these
> differ only in that test2 uses two clauses with cut, while
> test3 uses if-then-else). Here you have a 15% increase, not 50.
>
> Actually, i see now that my explanation involving environments
> was wrong, sorry. The slowdown is due to test2 using indexing,
> where test3 creates a choicepoint.
>>
>> Note: this 50% increase has resulted in that I have more or
>> less ceased using if-then-else constructs in ECLiPSe. :(
>>
> Apart from the fact that there is no 50% increase (unless you
> compare versions with slightly different semantics like test4
> and test5), such a conclusion would be wrong in general.
Well, Joachim, I did say 'up to'. Besides, test3 is just
about as simple as it can get! You know, I can send you an
example that does exhibit 50% increase, to show you that I
am not exaggerating.
> Whether an if-then-else version is faster or slower than a
> multi-clause-cut version depends on a number of factors, some
> of which are not obvious even when you know something about
> WAM implementations, e.g.
> - presence of indexable information in the condition
> - whether the condition is simple or complex
> - number of arguments of the clause
> - number of permanent variables in the clause
I concur.
> The good news is that in my plans for a new ECLiPSe compiler,
> I'm making sure that both versions have the same performance.
> The bad news is, I don't know if we'll ever get round to
> implementing it :-/
Please do try (harder)! ;)
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
.
- Follow-Ups:
- Re: question about last call optimization
- From: Joachim Schimpf
- Re: question about last call optimization
- References:
- Re: question about last call optimization
- From: Bart Demoen
- Re: question about last call optimization
- From: Joachim Schimpf
- Re: question about last call optimization
- From: Nameless
- Re: question about last call optimization
- From: Joachim Schimpf
- Re: question about last call optimization
- From: Nameless
- Re: question about last call optimization
- From: Joachim Schimpf
- Re: question about last call optimization
- Prev by Date: Re: Prolog compiler for Windows XP.
- Next by Date: File names and consult.
- Previous by thread: Re: question about last call optimization
- Next by thread: Re: question about last call optimization
- Index(es):
Relevant Pages
|