Commit graph

23 commits

Author SHA1 Message Date
Evgenii Stratonikov
1d4e7550fc Use macros in AVX hash implementation 2019-10-10 11:29:40 +03:00
Evgenii Stratonikov
f296adb043 Remove usage of unsafe 2019-10-10 11:04:15 +03:00
Evgenii Stratonikov
782ed7554b Use macros in asm code 2019-10-09 18:11:53 +03:00
Evgenii Stratonikov
fc059cac87 Use AVX2 only if AVX is also present 2019-10-09 18:03:39 +03:00
Evgenii Stratonikov
648b1deca7 Move cpuid facility to separate package 2019-10-09 18:03:35 +03:00
Evgenii Stratonikov
f613ab2c25 Implement matrix multiplication with pure Go
Set suitable backend for GF127 arithmetic for Concat(), Sum() etc.
2019-10-09 12:31:47 +03:00
Evgenii Stratonikov
38df9b2c63 Detect CPU features in Sum() 2019-10-04 17:58:42 +03:00
Evgenii
63e8eeac86 Determine available features through CPUID 2019-09-04 11:47:44 +03:00
Evgenii
7c12188650 Perform allocation outside of mulBitRightPure 2019-07-19 19:04:44 +03:00
Evgenii
6c75cc0871 Add pure Go hash implementation 2019-07-19 18:59:43 +03:00
Evgenii
c3cfe63e64 Add possibility to use different implementations in cli
Also make API smaller and more consistent and fix typos in documentation.
2019-07-19 18:24:30 +03:00
Evgenii
c68e38b943 Inline asm function in loop for AVX2 implementation
Right now AVX2 implementation looses to C binding in speed.
This is probably, because of 2 things:
1. Go does not inline `mulBitRightx2` in loop iteration.
2. `minmax` is loaded every time from memory.

In this PR:
1. Unroll `mulBitRightx2` manually and use `mulByteRightx2` instead.
2. Generate `minmax` in place without `LOAD/LEA` instructions.
2019-07-19 16:11:06 +03:00
Evgenii
bd43de6056 Report benchmark results in MB/s 2019-07-10 12:07:54 +03:00
Evgenii
ad8c7bce1b Fix type assertions 2019-06-24 10:07:16 +03:00
Evgenii
e1d9fc8058 Use testify in tests 2019-06-21 23:18:16 +03:00
Evgenii
4b11f50264 Fix error in AVX2 implementation 2019-06-21 23:10:08 +03:00
Evgenii
eaeceead2f Add benchmarks 2019-06-21 22:40:17 +03:00
Evgenii
9485f49f3b Get rid of unsafe usage and add tests 2019-06-21 22:32:32 +03:00
Evgenii
a967cc9d3d Make use of AVX2 in Sum() by default 2019-06-21 18:47:01 +03:00
Evgeniy Kulikov
6b644651fa
Rewrite tests (#3)
- rewrite tests
- remove gomega from deps
2019-05-29 14:10:17 +03:00
Evgenii
d5efd8bdce add SubtractR/L operation on hashes
- add Inverse operation to sl2
- fix a bug in xN()
2019-01-29 16:11:50 +03:00
Evgeniy Kulikov
42499b9eb0
Fix formatting 2019-01-03 11:04:43 +03:00
Evgeniy Kulikov
5cf44c62ac
Initial 2018-12-29 16:04:17 +03:00