Archive for Posts Tagged performance:

A Better ‘nub’

July 28th

During my Haskell travels I have found myself using the nub function quite regularly. For those too lazy to click the link: nub removes duplicates from a list of items. eg:

Prelude> nub [1,1,3,3,5,5,6,6,6,1]
[1,3,5,6]

Fairly simple stuff. Until recently I hadn’t bothered pondering the internal implementation of this function because I hadn’t really been too worried about [...]

Size

Colors