libgocryptfs/internal/stupidgcm
Jakob Unterwurzacher a3f5a8492a stupidgcm: batch C calls in chacha20poly1305_seal
Go has a high overhead for each C call, so batch
all openssl operations in the new C function chacha20poly1305_seal.

Benchmark results:

internal/speed$ go test -bench BenchmarkStupidXchacha -count 10 > old.txt
internal/speed$ go test -bench BenchmarkStupidXchacha -count 10 > new.txt

internal/speed$ benchstat old.txt new.txt
name             old time/op   new time/op   delta
StupidXchacha-4   8.79µs ± 1%   7.25µs ± 1%  -17.54%  (p=0.000 n=10+10)

name             old speed     new speed     delta
StupidXchacha-4  466MB/s ± 1%  565MB/s ± 1%  +21.27%  (p=0.000 n=10+10)
2021-09-07 18:14:05 +02:00
..
.gitignore stupidgcm: batch C calls in chacha20poly1305_seal 2021-09-07 18:14:05 +02:00
Makefile stupidgcm: batch C calls in chacha20poly1305_seal 2021-09-07 18:14:05 +02:00
autherr.go forcedecode: tighten checks 2017-04-24 00:25:02 +02:00
benchmark.bash speed: add benchmark.bash helper 2017-02-24 09:38:50 +01:00
chacha.c stupidgcm: batch C calls in chacha20poly1305_seal 2021-09-07 18:14:05 +02:00
common_test.go stupidgcm: add stupidXchacha20poly1305 2021-09-07 18:14:05 +02:00
locking.go stupidgcm: fix openssl 1.1 build failure 2017-07-14 20:44:07 +02:00
prefer.go Unbreak hyperlinks broken by go mod v2 conversion 2021-08-30 11:31:01 +02:00
stupidchacha.go stupidgcm: batch C calls in chacha20poly1305_seal 2021-09-07 18:14:05 +02:00
stupidchacha_test.go stupidgcm: stupidChacha20poly1305: normalize panic messages 2021-09-07 18:14:05 +02:00
stupidgcm.go stupidgcm: add testWipe test 2021-09-02 10:17:01 +02:00
stupidgcm_test.go stupidgcm: deduplicate tests 2/2 2021-09-02 10:04:38 +02:00
stupidxchacha.go stupidgcm: add stupidXchacha20poly1305 2021-09-07 18:14:05 +02:00
stupidxchacha_test.go stupidgcm: add stupidXchacha20poly1305 2021-09-07 18:14:05 +02:00
without_openssl.go go mod: declare module version v2 2021-08-23 15:05:15 +02:00