Proposal: add 'findLess' and variants to containers

Michael Craig mkscrg at gmail.com
Thu Feb 16 21:14:38 CET 2012


Thanks for making this proposal, Twan. I've actually been meaning to make
the same proposal for the last few weeks. Before I understood the proposal
process (thanks again to Milan for filling me in) I made a pull request on
GitHub with an implementation of a `successor` function on IntMap (very
similar to your `findGreaterEqual`).

https://github.com/haskell/containers/pull/8

It shows that a more efficient implementation is available, which avoids
`splitLookup` and therefore `union`. (Disclaimer: I haven't run any
benchmarks to show that my internal implementation is actually faster.)

As I mention in that pull, these functions are useful for very practical
things like consistent hashing, etc.

Mike Craig



On Thu, Feb 16, 2012 at 2:37 PM, Johan Tibell <johan.tibell at gmail.com>wrote:

> Hi,
>
> First, thanks for writing such a detailed proposal.
>
> I don't have strong feelings one way or the other. Like always I'm
> worried about API growth. How about performance? Can these functions
> be implemented efficiently outside the library?
>
> Since I don't feel strongly either way I'm fine with this if Milan and
> the community are.
>
> Cheers,
> Johan
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20120216/174c2d0a/attachment.htm>


More information about the Libraries mailing list