Giter Site home page Giter Site logo

Comments (3)

okeuday avatar okeuday commented on May 10, 2024

@louiscb quickrand and uuid should be treated as separate Erlang/OTP applications, so it is best to not add to the uuid Erlang module with quickrand initialization details. If more information is added to the README file, that would help people avoid any problems (there is already info about quickrand:seed/0 in the current README). Feel free to do a pull request with a README addition for quickrand_cache initialization details.

from uuid.

louiscb avatar louiscb commented on May 10, 2024

Ok. What's the intended use case of the cached v4? Since we have to do the quickrand initialisation per process, it adds a lot of overhead and increases the execution time of the uuid generation massively.

from uuid.

okeuday avatar okeuday commented on May 10, 2024

I added a description in quickrand_cache for its usage.
https://github.com/okeuday/quickrand/blob/2e82140b30bbf548726f98b836bc469cabcfb075/src/quickrand_cache.erl#L7-L18
I also modified the README change to provide more details.
The usage of quickrand_cache would want the cached random data to stick around a long time, so the Erlang process should be long-lived if the init function is used. Otherwise, you should be using the new function as described in the new README info.

from uuid.

Related Issues (20)

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.