Code Monkey home page Code Monkey logo

Comments (4)

vcunat avatar vcunat commented on June 14, 2024

Suggestion: this polynomial looks nice
http://www.wolframalpha.com/input/?i=factor+x^0+x^1+x^2+x^5+x^6+x^7+x^9+x^11+x^14+x^19+x^20+x^21+x^22+x^24+x^27+x^30+x^32+mod+2

I think there's little advantage in using smaller than 32-bit state for this algorithm, even on 32-bit-only machines (which are rare enough nowadays). In decimal representation it's 1232620263 (if without the x^32 bit).

Apart from being irreducible, it's also primitive, which might have some advantage, but I haven't given much thought to that and I'm really not so good in number theory anyway. I just chose a random line from a public list https://users.ece.cmu.edu/~koopman/lfsr/index.html

from rollinghashcpp.

lemire avatar lemire commented on June 14, 2024

@vcunat

Thank you. I don't know how we ended up with a reducible polynomial. It is slightly embarrassing. I fixed it with the last commit.

from rollinghashcpp.

lemire avatar lemire commented on June 14, 2024

@vcunat

I have moved your other proposal to another issue : #7

You are entirely correct, but I want to distinguish the issues.

Closing this particular one.

from rollinghashcpp.

vcunat avatar vcunat commented on June 14, 2024

Right, it is better to keep it separate.

from rollinghashcpp.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.