aboutsummaryrefslogtreecommitdiff
path: root/internal/stupidgcm/Makefile
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-09-03 16:44:13 +0200
committerJakob Unterwurzacher2021-09-07 18:14:05 +0200
commita3f5a8492a8bc62d8e2a639bd449b425efa66ce2 (patch)
tree050677e396e6f89211bb9fc1a006e8284625fd31 /internal/stupidgcm/Makefile
parent9e1dd73e55e095b8e8b4264897c4d21fcdcdb2ae (diff)
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)
Diffstat (limited to 'internal/stupidgcm/Makefile')
-rw-r--r--internal/stupidgcm/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/stupidgcm/Makefile b/internal/stupidgcm/Makefile
new file mode 100644
index 0000000..19f9914
--- /dev/null
+++ b/internal/stupidgcm/Makefile
@@ -0,0 +1,7 @@
+.PHONY: gcc
+gcc:
+ gcc -Wall -Wextra -Wformat-security -Wconversion -lcrypto -c *.c
+
+.PHONY: format
+format:
+ clang-format --style=WebKit -i *.c