{"id":15295089,"url":"https://github.com/engusmaze/frand","last_synced_at":"2025-10-07T02:36:09.434Z","repository":{"id":185714723,"uuid":"660701748","full_name":"engusmaze/frand","owner":"engusmaze","description":"Blazingly Fast Pseudo Random Number Generator written in Rust","archived":false,"fork":false,"pushed_at":"2024-09-21T12:40:27.000Z","size":73,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T17:51:30.301Z","etag":null,"topics":["no-std","prng","rand","random","random-generation","rust","rust-lang"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/frand","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/engusmaze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-30T16:12:54.000Z","updated_at":"2025-01-23T01:09:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"857b5cce-7d39-4843-8205-b83f28e616d4","html_url":"https://github.com/engusmaze/frand","commit_stats":null,"previous_names":["engusmaze/frand"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engusmaze%2Ffrand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engusmaze%2Ffrand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engusmaze%2Ffrand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engusmaze%2Ffrand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/engusmaze","download_url":"https://codeload.github.com/engusmaze/frand/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741161,"owners_count":21154252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["no-std","prng","rand","random","random-generation","rust","rust-lang"],"created_at":"2024-09-30T17:08:34.321Z","updated_at":"2025-10-07T02:36:04.378Z","avatar_url":"https://github.com/engusmaze.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FRand\n\n[![Crate](https://img.shields.io/crates/v/frand.svg)](https://crates.io/crates/frand)\n\n**FRand** is a blazingly fast, small, and simple pseudo-random number generator (PRNG) written in Rust. The advantage of using FRand is that it can produce more random numbers per second than other libraries. It also produces high-quality random numbers using a fast **non-cryptographic** hashing algorithm.\n\nTo find the best constants for the algorithm, I used an automated program that tried many random constants per second and measured the bias of the output. The bias was estimated using the avalanche effect, which is a property of good hash functions that ensures that a small change in the input produces a large change in the output. The program selected the constants that minimized the bias and maximized the randomness.\n\n**FRand** is really simple to use. Here is a simple example of how to use FRand to generate a random float:\n\n```rs\nuse frand::Rand;\n\nlet mut rng = Rand::new();\nprintln!(\"{}\", rng.gen::\u003cf32\u003e());\n```\n\n## Speeds\n\n### u64\n\n| rand::ThreadRng | rand::SmallRng | fastrand::Rng | frand::Rand |\n| :-------------: | :------------: | :-----------: | :---------: |\n|      1.00x      |     3.74x      |     5.80x     |    6.09x    |\n\n### f64\n\n| rand::ThreadRng | rand::SmallRng | fastrand::Rng | frand::Rand |\n| :-------------: | :------------: | :-----------: | :---------: |\n|      1.00x      |     3.79x      |     2.34x     |    5.57x    |\n\n### u128\n\n| rand::ThreadRng | rand::SmallRng | fastrand::Rng | frand::Rand |\n| :-------------: | :------------: | :-----------: | :---------: |\n|      1.00x      |     2.15x      |     6.79x     |    7.24x    |\n\nIf you have suggestions on how to improve this library, you can contribute to this project!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengusmaze%2Ffrand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengusmaze%2Ffrand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengusmaze%2Ffrand/lists"}