fatedier 0f1005ff61 using glide | 7 vuotta sitten | |
---|---|---|
.. | ||
mathtool | 7 vuotta sitten | |
.gitignore | 7 vuotta sitten | |
.travis.yml | 7 vuotta sitten | |
LICENSE | 7 vuotta sitten | |
README.md | 7 vuotta sitten | |
matrix.go | 7 vuotta sitten | |
matrix_test.go | 7 vuotta sitten | |
rs.go | 7 vuotta sitten | |
rs_amd64.go | 7 vuotta sitten | |
rs_amd64.s | 7 vuotta sitten | |
rs_other.go | 7 vuotta sitten | |
rs_test.go | 7 vuotta sitten | |
tbl.go | 7 vuotta sitten |
To get the package use the standard:
go get github.com/templexxx/reedsolomon
See the associated GoDoc
These three parts will cost too much time:
SIMD will solve no.1
Cache-friendly codes will help to solve no.2 & no.3, and more, use a sync.Map for cache inverse matrix, it will help to save about 1000ns when we need same matrix.
Performance depends mainly on:
And we must know the benchmark test is quite different with encoding/decoding in practice.
Because in benchmark test loops, the CPU Cache will help a lot. In practice, we must reuse the memory to make the performance become as good as the benchmark test.
Example of performance on my MacBook 2017 i7 2.8GHz. 10+4 (with 0.1.0).
Vector size | Speed (MB/S) |
---|---|
1400B | 7655.02 |
4KB | 10551.37 |
64KB | 9297.25 |
1MB | 6829.89 |
16MB | 6312.83 |
Vector size | Speed (MB/S) |
---|---|
1400B | 4124.85 |
4KB | 5715.45 |
64KB | 6050.06 |
1MB | 5001.21 |
16MB | 5043.04 |
Vector size | Speed (MB/S) |
---|---|
1400B | 6170.24 |
4KB | 9444.86 |
64KB | 9311.30 |
1MB | 6781.06 |
16MB | 6285.34 |
reconstruct benchmark tests here run with inverse matrix cache, if there is no cache, it will cost more time( about 1000ns)