Hi Joe,

> For my own curiosity, should Pilog perform much better than a
> collect/filter? I would think that collect/filter should be nearly
> instant on upwards of a few thousand items (untested). When the data

Yes, I would say so too. And for larger results sets, or if multiple
indexes are involved where you don't know which one will give the best
hits, 'select' is better.

> psuedocode:
> (let
>    (Started (collect 'sDate '+Proj Sdate)  # find project started
> after the S date
>     Ended (collect 'eDate '+Proj "1900-01-01" Edate) # find projects
> ended before the end date
>     StartedBefore (collect 'sDate '+Proj "1900-01-01" Sdate) #
> projects with start date before range
>     EndedAfter (collect 'eDate '+Proj Edate) # projects with end date
> after the range
> With this approach, the various sets would be tested and duplicates removed
> maybe something like this
> (uniq Started Ended (sect StartedBefore EndedAfter))
> ..
> I might have the logic wrong, but I would wonder if that's faster than
> just hitting all the entries and filtering with a typical use case

I would say that multiple 'collect's, followed by merging and uniq'ing,
are more expensive.

♪♫ Alex
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to