syncthing/lib
Jakob Borg 9b1c592fb7 lib/scanner: Speed up weak hash
The rolling version of adler32 is just a wrapper around the standard
hash/adler32 when used in a non-rolling fashion, but it's inefficient as
it allocates a new hash instance for every Write(). This uses the
default version instead in the block hasher, and adds a test to verify
the result is the same as they were before. It reduces allocations by
88% and increases speed about 5%.

	benchmark               old ns/op     new ns/op     delta
	BenchmarkHashFile-8     64434698      61303647      -4.86%

	benchmark               old MB/s     new MB/s     speedup
	BenchmarkHashFile-8     276.65       290.78       1.05x

	benchmark               old allocs     new allocs     delta
	BenchmarkHashFile-8     1238           150            -87.88%

	benchmark               old bytes     new bytes     delta
	BenchmarkHashFile-8     17877363      49292         -99.72%
2017-01-18 10:33:17 +01:00
..
auto build: Generate gui.files.go on the fly, remove from repo 2016-03-28 10:03:13 +00:00
beacon Remove unused struct field 2015-10-27 09:55:05 +01:00
config lib/model, lib/weakhash: Hash using adler32, add heuristic in puller 2017-01-04 21:04:13 +00:00
connections lib/connections: Allow on the fly changes to rate limits (fixes #3846) 2017-01-02 11:29:20 +00:00
db lib/db: Don't panic on unknown folder in ListFolders (fixes #3584) 2017-01-04 10:34:52 +00:00
dialer lib/connections: Support setting traffic class (fixes #3790) 2016-12-21 11:01:15 +01:00
discover vendor: Update github.com/gogo/protobuf 2017-01-03 00:16:21 +00:00
events all: Add folder pause, make pauses permanent (fixes #3407, fixes #215, fixes #3001) 2016-12-21 18:41:25 +00:00
fs lib/fs: The interface and basicfs 2016-11-24 12:07:14 +00:00
ignore lib/ignore: Centralize handling of temporary filenames (fixes #3899) 2017-01-17 07:33:48 +00:00
logger cmd/syncthing: Extract interfaces for things the API depends on 2016-03-21 19:36:08 +00:00
model lib/ignore: Centralize handling of temporary filenames (fixes #3899) 2017-01-17 07:33:48 +00:00
nat lib/nat: Avoid concurrent reset of NAT timer (fixes #3337) 2016-06-26 10:17:12 +00:00
osutil lib/osutil: Replace IsDir with TraversesSymlink (fixes #3839) 2017-01-10 07:09:31 +00:00
pmp build, lib: Correct total test coverage calculation 2016-08-08 16:29:32 +00:00
protocol vendor: Update github.com/gogo/protobuf 2017-01-03 00:16:21 +00:00
rand lib/rand: Break out random functions into separate package 2016-05-26 07:02:56 +00:00
rc lib/rc: Remove pause to aggregate events (ref #3527) 2016-12-14 10:24:36 +01:00
relay lib/relay: Close invitation channel in all error cases (fixes #3726) 2016-11-13 09:32:05 +01:00
scanner lib/scanner: Speed up weak hash 2017-01-18 10:33:17 +01:00
sha256 lib/sha256: Smoke test the implementation on startup (hello OpenSUSE!) 2016-12-28 12:15:51 +01:00
signature cmd/syncthing: Add selectable sha256 package (fixes #3613, fixes #3614) 2016-09-23 19:33:54 +00:00
stats build, lib: Correct total test coverage calculation 2016-08-08 16:29:32 +00:00
symlinks lib/model, lib/protocol, lib/scanner: Include symlink target in index, pull symlinks synchronously 2016-12-09 18:02:18 +00:00
sync build: Enable gometalinter "gosimple" check, improve build.go 2016-12-21 14:53:45 +01:00
tlsutil build, lib: Correct total test coverage calculation 2016-08-08 16:29:32 +00:00
upgrade lib/upgrade: Cleanup failed upgrades (fixes #3500, fixes #3530) 2016-08-23 06:53:39 +00:00
upnp lib/upnp: Correct the result deduplication mechanism (fixes #3578) 2016-09-24 07:33:56 +00:00
util build: Enable gometalinter "gosimple" check, improve build.go 2016-12-21 14:53:45 +01:00
versioner build: Enable gometalinter "gosimple" check, improve build.go 2016-12-21 14:53:45 +01:00
weakhash lib/model, lib/weakhash: Hash using adler32, add heuristic in puller 2017-01-04 21:04:13 +00:00