I think one example is calculating things like standard deviation, where you
need each data item separately, first to calculate the mean, then to
calculate the variance.  Thresholding (finding 'optimal' values) is another
one.

On very large datasets, with, say, a high parameter space, it might take
quite a while to do the calculations.  Of course, avg() is already in the
spec, so this isn't the 'perfect' instance, but I can imagine problem spaces
where a non-linear space is approximated into a linear one in some way not
obvious.

--Keith

******************************************************
- Sounds like a Wookie; acts like mad cow.

- I'm not a professional; I just get paid to do this.

- Rules for programming:
   1.  Get it working, right?
   2.  Get it working right.

- Things I've learned about multithreaded programming:

    123...   PPArrvooottieedcc ttm  ueelvvteeirrtyyhtt
rhheiianndgge  dwi hnpi rctohhg eri aslm omscitanalgt 
 iowcbh,je engceltvo ebwrah lip,co hso srci abonlt ehb
.ee^Nr waicscee snsoetd  'aotb jtehcet -slaomcea lt'il
m^Ne from two or more threads
******************************************************

-----Original Message-----
From: Roger Binns [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 06, 2004 7:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [sqlite] Implementing aggregate user functions


> new API function.  But I am loath to add new API functions without 
> good reason and I do not consider performance optimization of an 
> exception condition a good reason.  So you are going to have to argue 
> very hard to get such a thing implemented.

My motivation isn't based on performance, but on correctness.  If the
function already did sqlite3_result_error in step, it is going to be
somewhat upset at having to give a value anyway in final.

It may also be the case that some functions take a lot of time to calculate
their final results and can't do so step by step, although I can't think of
any examples :-)

I am doing an enhanced Python wrapper and want to make user functions
written in Python seem as natural as possible.  Performance will matter
somewhat less :-)

Roger

Reply via email to