klauspost / reedsolomon

Reed-Solomon Erasure Coding in Go
MIT License
1.87k stars 246 forks source link

Try further optimize ReconstructSome for leopard 8+16 #274

Closed liamsi closed 5 months ago

liamsi commented 7 months ago

Trying:

This might lead to failing tests. But if not this should be much faster than before.

builds on changes introduced in #272

klauspost commented 7 months ago

Note that ReconstructSome isn't the most well-tested function in the library (it was mostly a contribution), so I wouldn't take tests passing as gospel that everything is all right.

I suggest adding some more detailed tests.

liamsi commented 7 months ago

Yeah, that makes sense. I was hoping that @elias-orijtech could try to optimize, test, and benchmark this further. I think particularly the errorBits bitfield is rather rarely used in tests: https://github.com/klauspost/reedsolomon/blob/2d78890c1322b3ef347a1428750bec55fafe7bf3/leopard.go#L410

I was also surprised it is constructed at all if we already know with the line if it is needed or not (I'm guessing it is rather inexpensive but it seems somewhat unnecessary.

liamsi commented 5 months ago

Closing in favour of #272