Re: How can "cons per call" be so different for these two very similar functions?
- From: "dpapathanasiou" <denis.papathanasiou@xxxxxxxxx>
- Date: 31 Aug 2006 05:16:22 -0700
Hi Pascal,
I understand that both implementations are O( length()*length() ), but
what confuses me is why metering shows a huge difference in consing,
when the two functions are essentially the same.
As I said, I thought initially that the extra (not) statement in the
second function may be the culprit, but as you said, that should have
no bearing on it.
Is it something wrong with the metering package or my use of it? I
tried it several times, and in each case the cons per call ratios were
the same, i.e. about 110 cons per call for the first function, and over
7,100 for the second.
P.S. Thanks for the idea of pre-processing one of the lists: the first
of the two lists gets run through both functions over and over again
(i.e. we are checking sets of candidate lists versus a target list, so
preprocessing the target list would save us processing cycles).
.
- Follow-Ups:
- Re: How can "cons per call" be so different for these two very similar functions?
- From: Pascal Bourguignon
- Re: How can "cons per call" be so different for these two very similar functions?
- References:
- How can "cons per call" be so different for these two very similar functions?
- From: dpapathanasiou
- Re: How can "cons per call" be so different for these two very similar functions?
- From: Pascal Bourguignon
- How can "cons per call" be so different for these two very similar functions?
- Prev by Date: Re: perceived efficiency
- Next by Date: Re: best drink for programming
- Previous by thread: Re: How can "cons per call" be so different for these two very similar functions?
- Next by thread: Re: How can "cons per call" be so different for these two very similar functions?
- Index(es):
Relevant Pages
|