Commit Graph

37 Commits

Author SHA1 Message Date
Luke Champine 59a82aea36
fix typo 2020-08-10 18:11:31 -04:00
lukechampine 7a6b5a0fe1 add AVX512 implementations 2020-08-09 18:14:48 -04:00
lukechampine 221995220f add AVX2 optimization for XOF 2020-08-02 15:20:28 -04:00
lukechampine c2af4bc4c2 add AVX2 implementation 2020-08-01 14:48:37 -04:00
lukechampine 6c1c802729 skip leading zeros when computing root 2020-02-02 16:40:35 -05:00
lukechampine 617550f073 amortize hasher initialization for Sum256/Sum512
As expected, the performance increase is only noticeable for
small inputs:

name            old time/op    new time/op    delta
Sum256/64-4        343ns ± 4%     243ns ± 6%  -28.96%  (p=0.008 n=5+5)
Sum256/1024-4     2.62µs ± 1%    2.50µs ± 2%   -4.57%  (p=0.008 n=5+5)
Sum256/65536-4     175µs ± 1%     170µs ± 4%     ~     (p=0.190 n=4+5)

Co-authored-by: Dmitry Yu Okunev <xaionaro@dx.center>
2020-02-02 14:53:41 -05:00
lukechampine b60a0c0b5a fix typo 2020-01-15 23:50:45 -05:00
lukechampine bef3cb791c add vanity import directive 2020-01-14 00:28:18 -05:00
lukechampine 20804e899d unroll word<->byte conversions 2020-01-13 14:27:21 -05:00
lukechampine f87940e245 add compress comments, remove gen 2020-01-13 13:53:16 -05:00
renthraysk dc64d4b5a6
Merge pull request #1 from renthraysk/alternate-g-inline
Changing g() to pass values, allows inlining and keeping more of compress() state in registers
2020-01-12 22:16:27 +00:00
renthraysk 4553d55fb5 Tidy up generated code & comments 2020-01-12 22:01:00 +00:00
renthraysk 7786c919ad Improve reg usage in compress() [16]uint32 to vars 2020-01-12 18:59:44 +00:00
renthraysk 855147f461 g() takes and returns state values, inlines. 2020-01-12 18:20:37 +00:00
renthraysk c931fb704d Switch to named return value for compress() saves copying. 2020-01-12 14:55:44 +00:00
renthraysk c649c5ac94 Eliminate the need for permute() by generating code for each round 2020-01-12 14:47:47 +00:00
lukechampine 2343930773 switch to sparse stack 2020-01-11 21:54:56 -05:00
lukechampine 70299b9d3b reorder some functions and get 100% coverage 2020-01-11 21:45:09 -05:00
lukechampine 633f7e15c1 only pad block when necessary 2020-01-11 20:58:07 -05:00
lukechampine 6ff1174970 flesh out some docstrings/comments 2020-01-11 20:20:01 -05:00
lukechampine 72d3c39081 make Sum functions zero-alloc 2020-01-10 17:17:39 -05:00
lukechampine 204828b0de chunkLen -> chunkSize 2020-01-10 16:37:28 -05:00
lukechampine 37e4314bf1 more compact addChunkChainingValue 2020-01-10 16:35:20 -05:00
lukechampine 4c13e3a25c blockLen -> blockSize 2020-01-10 16:01:33 -05:00
lukechampine 4833fabd0e fix SeekEnd behavior 2020-01-10 15:07:07 -05:00
lukechampine d19fa689c4 Merge branch 'renthraysk-master' 2020-01-10 12:56:09 -05:00
renthraysk 07853371e5 Split g() into 2 inlines funcs.
Eliminates calls & BC in round
2020-01-10 12:55:58 -05:00
lukechampine fd30fee094 implement Seek 2020-01-10 12:43:02 -05:00
lukechampine 3d75f823bd new API for derive_key 2020-01-10 00:55:25 -05:00
lukechampine 7c89cded14 update README 2020-01-09 23:09:57 -05:00
lukechampine bc09571efd minor performance improvements 2020-01-09 23:02:28 -05:00
lukechampine 51ea9b114e rename output -> node, and more style changes 2020-01-09 22:46:24 -05:00
lukechampine 83947f416f unexport constants and refactor to idiomatic Go 2020-01-09 17:58:48 -05:00
lukechampine 2ca7badf67 implement XOF 2020-01-09 16:25:24 -05:00
lukechampine 062bad69bc set correct block size 2020-01-09 15:39:50 -05:00
lukechampine bd08550d6e add derive key mode 2020-01-09 15:38:44 -05:00
lukechampine 0a863bb651 initial commit 2020-01-09 15:10:01 -05:00