Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
awnumar committed Mar 15, 2021
1 parent 2325f90 commit 166e2be
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ fastrand
go get github.com/awnumar/fastrand
```

`fastrand` implements a cryptographically secure pseudorandom number generator.
The generator is seeded using the system's default entropy source, and
thereafter produces random values via repeated hashing. As a result, `fastrand`
can generate randomness much faster than `crypto/rand`, and generation cannot
fail beyond a potential panic during `init()`.
`fastrand` implements a cryptographically secure pseudorandom number generator. The generator is seeded using the system's default entropy source, and thereafter produces random values via repeated hashing. As a result, `fastrand` can generate randomness much faster than `crypto/rand`, and generation cannot fail beyond a potential panic during `init()`.

`fastrand` was forked from `gitlab.com/NebulousLabs/fastrand`. This version of the package
uses securely allocated memory provided by `github.com/awnumar/memguard`.
`fastrand` was forked from `gitlab.com/NebulousLabs/fastrand`. This version of the package uses securely allocated memory provided by `github.com/awnumar/memguard`.

`fastrand` also scales better than `crypto/rand` and `math/rand` when called in
parallel. In fact, `fastrand` can even outperform `math/rand` when using enough threads.
`fastrand` also scales better than `crypto/rand` and `math/rand` when called in parallel. In fact, `fastrand` can even outperform `math/rand` when using enough threads.

Alternatively, use [`frand`](https://github.com/lukechampine/frand) by [Luke Champine](https://github.com/lukechampine) if you are primarily concerned with speed or if memory security is not part of your threat model. `frand` is [substantially faster](https://github.com/lukechampine/frand#benchmarks) than this package.

## Benchmarks ##

Expand Down

0 comments on commit 166e2be

Please sign in to comment.