git-annex/Logs
Joey Hess 5c960601aa 4 ns optimisation of repeated calls to hasDifference on the same Differences
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.
2015-06-11 16:34:35 -04:00
..
Chunk update my email address and homepage url 2015-01-21 12:50:09 -04:00
Difference rejigger imports for clean build with ghc 7.10's AMP changes 2015-05-10 16:20:30 -04:00
PreferredContent update my email address and homepage url 2015-01-21 12:50:09 -04:00
Presence parse X in location log file as indicating a dead key 2015-06-09 13:28:30 -04:00
Trust update my email address and homepage url 2015-01-21 12:50:09 -04:00
Activity.hs Fix activity log parsing. 2015-04-09 21:02:38 -04:00
Chunk.hs implement annex.tune.branchhash1 2015-01-28 17:17:26 -04:00
Difference.hs 4 ns optimisation of repeated calls to hasDifference on the same Differences 2015-06-11 16:34:35 -04:00
FsckResults.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Group.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Location.hs dead --key: Can be used to mark a key as dead. 2015-06-09 14:52:05 -04:00
MapLog.hs support time-1.5.0 2015-05-10 15:21:35 -04:00
MetaData.hs remove back-compat code for old version of containers 2015-06-06 15:23:53 -04:00
NumCopies.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
PreferredContent.hs import Data.Default in Common 2015-01-28 16:11:28 -04:00
Presence.hs rethought distributed fsck; instead add activity.log and expire command 2015-04-05 12:50:02 -04:00
Remote.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
RemoteState.hs implement annex.tune.branchhash1 2015-01-28 17:17:26 -04:00
Schedule.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
SingleValue.hs support time-1.5.0 2015-05-10 15:21:35 -04:00
TimeStamp.hs couple of AMP warnings I missed before 2015-05-10 16:51:03 -04:00
Transfer.hs ignore failure to clean up stale transfer lock file 2015-05-19 23:46:42 -04:00
Transitions.hs support time-1.5.0 2015-05-10 15:21:35 -04:00
Trust.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Unused.hs support time-1.5.0 2015-05-10 15:21:35 -04:00
UUID.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
UUIDBased.hs support time-1.5.0 2015-05-10 15:21:35 -04:00
View.hs update my email address and homepage url 2015-01-21 12:50:09 -04:00
Web.hs fsck: Added --distributed and --expire options, for distributed fsck. 2015-04-01 17:53:16 -04:00