Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #111042
| From | dpb <none@none.net> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Sum product formula with conditions |
| Date | 2019-07-20 07:47 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <qgv2go$1ak3$1@gioia.aioe.org> (permalink) |
| References | (11 earlier) <qgqenk$rui$1@gioia.aioe.org> <qgsvuo$p87$1@dont-email.me> <qgtb9g$1svj$1@gioia.aioe.org> <qgtm29$1c0i$1@gioia.aioe.org> <qgun6h$u4n$1@dont-email.me> |
On 7/20/2019 4:34 AM, Peter T wrote:
> "dpb" <none@none.net> wrote in message
>>> On 7/19/2019 12:52 PM, Peter T wrote:
>>> ...
>>>
>>>> I wouldn't want to discourage your use of the N function, however I
>>>> would
>>>> suggest others new this to consider using the 'double unary' as more
>>>> efficient.
>>> ...
>>>
>>> How so?
>>
>>> Double unary is more direct; - the N() function has to evaluate and so
>>> carries that extra overhead.
>>
>> I seriously doubt one could measure the difference in comparison to the
>> rest of the function--and the two negation operations are probably as
>> costly as the one store--in fact, good possibility the code boils down to
>> the same thing in the end.
>
> In typical usage yes of course the difference is trivial, both in terms of
> storage and efficiency. However repeated in many 1000s of cells where a
> sheet recalc can take seconds, or a simulation which could take miutes if
> not hours the difference could be significant.
Possible, but I seriously doubt it would be able to be shown to be the
bottleneck in any process. Would take a profiler to prove it to me.
> The "--" is a pair of operators, but the N calls a function which does a
> whole bunch of stuff only to replicate the double -
...
Don't know how it's implemented, either. It is a function, but all it
has to do is a fetch of the content. The operators have to eventually
do the same thing -- the cell content is still the same logical or text
or whatever it is; necessarily the operator also has to correctly deal
with it inside its own code ("there is no free lunch").
If the use of a double negation is such a highly recommended
functionality, it's interesting it never is mentioned as being needed or
the manner in which one should cast the logical to numeric in the
documentation for SUMIF() and friends where it seemingly is most prevalent.
--
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Sum product formula with conditions TIMOTHY <jey.kumar87@gmail.com> - 2019-07-14 21:15 -0700
Sum product formula with conditions Alan Wong <alanwongwinglun.hk@gmail.com> - 2019-07-15 16:52 -0700
Sum product formula with conditions TIMOTHY <jey.kumar87@gmail.com> - 2019-07-15 20:01 -0700
Re: Sum product formula with conditions Roger Govier <rogergovier@gmail.com> - 2019-07-16 08:40 -0700
Re: Sum product formula with conditions TIMOTHY <jey.kumar87@gmail.com> - 2019-07-17 07:46 -0700
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-17 11:34 -0500
Re: Sum product formula with conditions GS <gs@v.invalid> - 2019-07-17 16:20 -0400
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-17 18:58 -0500
Re: Sum product formula with conditions GS <gs@v.invalid> - 2019-07-18 11:53 -0400
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-18 11:29 -0500
Re: Sum product formula with conditions TIMOTHY <jey.kumar87@gmail.com> - 2019-07-18 10:33 -0700
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-18 13:45 -0500
Re: Sum product formula with conditions "Peter T" <askmy@email.com> - 2019-07-19 18:52 +0100
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-19 16:04 -0500
Re: Sum product formula with conditions GS <gs@v.invalid> - 2019-07-19 19:56 -0400
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-19 19:08 -0500
Re: Sum product formula with conditions "Peter T" <askmy@email.com> - 2019-07-20 10:34 +0100
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-20 07:47 -0500
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-20 08:50 -0500
Re: Sum product formula with conditions "Peter T" <askmy@email.com> - 2019-07-21 12:20 +0100
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-21 07:56 -0500
Re: Sum product formula with conditions "Peter T" <askmy@email.com> - 2019-07-21 17:18 +0100
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-21 13:27 -0500
Re: Sum product formula with conditions TIMOTHY <jey.kumar87@gmail.com> - 2019-07-21 20:47 -0700
Re: Sum product formula with conditions "Peter T" <askmy@email.com> - 2019-07-22 12:25 +0100
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-22 07:29 -0500
Re: Sum product formula with conditions TIMOTHY <jey.kumar87@gmail.com> - 2019-07-22 20:32 -0700
Re: Sum product formula with conditions dpb <none@none.net> - 2019-07-18 17:43 -0500
Re: Sum product formula with conditions TIMOTHY <jey.kumar87@gmail.com> - 2019-07-19 07:41 -0700
csiph-web