|
|
7 years ago | |
|---|---|---|
| .. | ||
| .gitignore | 8 years ago | |
| .travis.yml | 8 years ago | |
| LICENSE | 8 years ago | |
| README.md | 7 years ago | |
| matrix.go | 8 years ago | |
| rs.go | 8 years ago | |
| rs_amd64.go | 8 years ago | |
| rs_amd64.s | 8 years ago | |
| rs_other.go | 8 years ago | |
| tbl.go | 8 years ago | |
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)