scure-base icon indicating copy to clipboard operation
scure-base copied to clipboard

Speed-up hex using noble technique.

Open paulmillr opened this issue 11 months ago • 4 comments

The PR makes hex decoding 23x faster on 8KB inputs.

The cost: +40 lines of code.

Should we do it? Is hex a bottleneck?

paulmillr avatar Feb 28 '24 03:02 paulmillr

I think it's a really small price to pay for such a big performance improvement.

arobsn avatar Jun 21 '24 14:06 arobsn

@arobsn is it relevant to your use case? Is it a bottleneck in your case?

paulmillr avatar Jun 21 '24 15:06 paulmillr

I mean, we can speed-up every function, but that would make package big. If we speed up only some functions, we need to select which ones.

paulmillr avatar Jun 21 '24 15:06 paulmillr

I usually avoid using it because it's too slow, but yes, not really an issue for my use case. My point is that 40 lines of code is a good price to pay for a 23x performance boost.

arobsn avatar Jun 23 '24 23:06 arobsn