You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow not only literal lists.
This for example should allow NonEmpty lists at least.
Also do not think I do this things on a whim.
I postphoned the refactors from map, (++), until I understand the underlying GHC
Haskell processes & performance better.
I did some research on: is there a reason to use map over fmap, and are the
performance reasons?
In short - there is 0 information on why some people use `map` over `fmap`, there
are no reports of performance reasons.
Well, I know that there is a possibility of a minor type class interface
compilation & runtime use cost. But I think GHC is good enough to infer zero
cost for the concrete list type for which `map` gets used.
And overall we not did thorough profiling/perfommans walkthrough so far. I am
sure that use of standard fmap for code flexibility is not a bottleneck in the
design, I've seen some performance problems design has.
And we not even did the profiling to do inlining and specialize work yet. It is
more effective to keep using `fmap`, and supply specialization, which allows to
keep the code polymorhic, portable to write for and effective in performance.
0 commit comments