syncthing/lib
Audrius Butkevicius fafd30f804 lib/scanner: Use standard adler32 when we don't need rolling (#5556)
* lib/scanner: Use standard adler32 when we don't need rolling

Seems the rolling adler32 implementation is super slow when executed on large blocks, even tho I can't explain why.

BenchmarkFind1MFile-16    				     100	  18991667 ns/op	  55.21 MB/s	  398844 B/op	      20 allocs/op
BenchmarkBlock/adler32-131072/#00-16     		     200	   9726519 ns/op	1078.06 MB/s	 2654936 B/op	     163 allocs/op
BenchmarkBlock/bozo32-131072/#00-16      		      20	  73435540 ns/op	 142.79 MB/s	 2654928 B/op	     163 allocs/op
BenchmarkBlock/buzhash32-131072/#00-16   		      20	  61482005 ns/op	 170.55 MB/s	 2654928 B/op	     163 allocs/op
BenchmarkBlock/buzhash64-131072/#00-16   		      20	  61673660 ns/op	 170.02 MB/s	 2654928 B/op	     163 allocs/op
BenchmarkBlock/vanilla-adler32-131072/#00-16         	     300	   4377307 ns/op	2395.48 MB/s	 2654935 B/op	     163 allocs/op
BenchmarkBlock/adler32-16777216/#00-16               	       2	 544010100 ns/op	  19.27 MB/s	   65624 B/op	       5 allocs/op
BenchmarkBlock/bozo32-16777216/#00-16                	       1	4678108500 ns/op	   2.24 MB/s	51970144 B/op	      24 allocs/op
BenchmarkBlock/buzhash32-16777216/#00-16             	       1	3880370700 ns/op	   2.70 MB/s	51970144 B/op	      24 allocs/op
BenchmarkBlock/buzhash64-16777216/#00-16             	       1	3875911700 ns/op	   2.71 MB/s	51970144 B/op	      24 allocs/op
BenchmarkBlock/vanilla-adler32-16777216/#00-16       	     300	   4010279 ns/op	2614.72 MB/s	   65624 B/op	       5 allocs/op
BenchmarkRoll/adler32-131072/#00-16                  	    2000	    974279 ns/op	 134.53 MB/s	     270 B/op	       0 allocs/op
BenchmarkRoll/bozo32-131072/#00-16                   	    2000	    791770 ns/op	 165.54 MB/s	     270 B/op	       0 allocs/op
BenchmarkRoll/buzhash32-131072/#00-16                	    2000	    917409 ns/op	 142.87 MB/s	     270 B/op	       0 allocs/op
BenchmarkRoll/buzhash64-131072/#00-16                	    2000	    881125 ns/op	 148.76 MB/s	     270 B/op	       0 allocs/op
BenchmarkRoll/adler32-16777216/#00-16                	      10	 124000400 ns/op	 135.30 MB/s	 7548937 B/op	       0 allocs/op
BenchmarkRoll/bozo32-16777216/#00-16                 	      10	 118008080 ns/op	 142.17 MB/s	 7548928 B/op	       0 allocs/op
BenchmarkRoll/buzhash32-16777216/#00-16              	      10	 126794440 ns/op	 132.32 MB/s	 7548928 B/op	       0 allocs/op
BenchmarkRoll/buzhash64-16777216/#00-16              	      10	 126631960 ns/op	 132.49 MB/s	 7548928 B/op	       0 allocs/op

* Update benchmark_test.go

* gofmt

* fixup benchmark
2019-02-25 13:29:31 +04:00
..
auto build: Let "go generate" create assets 2018-06-26 10:29:36 +02:00
beacon all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
build all: Use new reflect based CLI (#5487) 2019-02-12 07:58:24 +01:00
config all: Get rid of fatal logging (#5537) 2019-02-14 20:29:14 +00:00
connections all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
db lib/db: Flush batch based on size and refactor (fixes #5531) (#5536) 2019-02-14 23:15:13 +00:00
dialer all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
discover all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
events all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
fs lib/fs: Rename fsFile* to basicFile* (#5546) 2019-02-24 18:02:02 +01:00
ignore all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
locations all: Use new reflect based CLI (#5487) 2019-02-12 07:58:24 +01:00
logger all: Get rid of fatal logging (#5537) 2019-02-14 20:29:14 +00:00
model all: Get rid of fatal logging (#5537) 2019-02-14 20:29:14 +00:00
nat all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
osutil all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
pmp all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
protocol all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
rand all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
rc all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
relay all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
scanner lib/scanner: Use standard adler32 when we don't need rolling (#5556) 2019-02-25 13:29:31 +04:00
sha256 all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
signature all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stats lib/db: Refactor: use a Lowlevel type underneath Instance (ref #5198) (#5212) 2018-10-10 11:34:24 +02:00
sync all: Even more boring linter fixes (#5501) 2019-02-02 11:45:17 +01:00
tlsutil all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
upgrade all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
upnp lib/upnp: Don’t log unknown device types (fixes #5038) (#5087) 2018-07-30 16:34:35 +02:00
util all: Use new reflect based CLI (#5487) 2019-02-12 07:58:24 +01:00
versioner all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
watchaggregator all: A few more interesting linter fixes (#5502) 2019-02-02 12:09:07 +01:00
weakhash lib/scanner: Use standard adler32 when we don't need rolling (#5556) 2019-02-25 13:29:31 +04:00