Efficent lens operation for Data.Map et al.

roconnor at theorem.ca roconnor at theorem.ca
Thu Jan 19 01:24:19 CET 2012


On Wed, 18 Jan 2012, Roman Cheplyaka wrote:

> * roconnor at theorem.ca <roconnor at theorem.ca> [2012-01-18 16:35:52-0500]
>> On Wed, 18 Jan 2012, Johan Tibell wrote:
>>
>>> IIRC you just replace the current functions with yours and run make in
>>> the benchmarks/ directory to compile the benchmark binaries (which use
>>> Criterion). Then simply run them.
>>
>> I got an error trying to build the benchmarks:
>
> Worked for me with GHC 7.0.4.
>
> The results are attached.
>
> In short, your version is indeed typically slower, up to a factor of 5
> (for lookup).

Apparently calling nomatch on every Bin is really slow.  Or so I'm 
guessing.

-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''



More information about the Libraries mailing list