summaryrefslogtreecommitdiff
path: root/Utility/URI.hs
Commit message (Collapse)AuthorAge
* oh foo, I didn't mean to include this in the prev commitGravatar Joey Hess2015-06-11
|
* 4 ns optimisation of repeated calls to hasDifference on the same DifferencesGravatar Joey Hess2015-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I want this as fast as possible, so it can be added to code paths without slowing them down. Avoid the set lookup, and rely on laziness, drops runtime from 14.37 ns to 11.03 ns according to this criterion benchmark: import Criterion.Main import qualified Types.Difference as New import qualified Types.DifferenceOld as Old main :: IO () main = defaultMain [ bgroup "hasDifference" [ bench "new" $ whnf (New.hasDifference New.OneLevelObjectHash) new , bench "old" $ whnf (Old.hasDifference Old.OneLevelObjectHash) old ] ] where s = "fromList [ObjectHashLower, OneLevelObjectHash, OneLevelBranchHash]" new = New.readDifferences s old = Old.readDifferences s A little bit of added boilerplate, but I suppose it's worth it to not need to worry about set lookup overhead. Note that adding more differences would slow down the old implementation; the new implementation will run the same speed.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* relicense general utility library code to BSDGravatar Joey Hess2014-05-10
| | | | | Omitted a couple of files what have had significant contributions from others.
* better approach for building distributionupdateGravatar Joey Hess2014-04-21
| | | | Use cabal include file
* fix distributionupdate buildGravatar Joey Hess2014-04-21
| | | | Including avoiding needing cabal's defines for Utility.URI
* adjust to not use cpp in modules used by configureGravatar Joey Hess2014-04-14