Proposal: add fusion RULES for Data.Maybe.mapMaybe

20 Nov
2013
20 Nov
'13
2:46 a.m.
Apologies, the subject of my previous email was wrong. It is about
Data.Maybe.mapMaybe, not Data.Map.mapMaybe.
On Wed, Nov 20, 2013 at 4:40 PM, Akio Takano
Hi,
Currently mapMaybe does not fuse at all. The attached patch implements necessary rules for fold/build fusion in both sides (the result and the second argument) to happen. When fusion does not happen, the function should behave exactly the same as before.
I ran some benchmarks, testing cases where fusion does and does not happen:
http://htmlpreview.github.io/?https://github.com/takano-akio/mapmaybe-benchm...
The benchmark code is:
https://github.com/takano-akio/mapmaybe-benchmarks/blob/master/main.hs
Discussion period: 2 weeks.
Thank you, Takano Akio
4201
Age (days ago)
4201
Last active (days ago)
0 comments
1 participants
participants (1)
-
Akio Takano