Java – how to use polynomials instead of bits to improve performance?

I have a 128 bit string, and my supervisor asked me to express the 128 bits as polynomials This is a scan of the paper he is writing:

His idea is that since we eliminate zeros from these bits, we will be able to perform the next operation faster than we handle all bits (mostly XOR between bits / polynomials)

I understand what the requirements are and I can do it on paper and in applications But my approach will not achieve his goal of improving performance He actually said that some libraries had done so, but unfortunately I couldn't find any The only one I found was the polynomial class to evaluate polynomials, which was not what I wanted

So do you know how to achieve this to improve performance? Thank you very much for any code / fragment / article

The application is written in Java, if there is any difference

thank you,

Mota

to update:

My supervisor said that the C library would complete the task I can't figure out how it works and how to do it

Solution

Is your supervisor familiar with BitSet? 128 bits are 16 bytes and can be stored as 2 long However, with BitSet, you don't have to worry about handling the combination of two long BitSet also provides methods for all common bit operations I think it's hard for you to find a better solution than this

Polynomial method is a very cool idea, but I think it is more theoretical than practical

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>