John Nunley
John Nunley
I don't see the issue with `compile-time-rng`. At worst, it slightly increases compile times at the cost of preventing worst-case quadratic behavior in certain data structures. Especially in webapps that...
@emilk Here's the solution I use in my own projects. ```rust struct HashMap { inner: hashbrown::HashMap, } impl Default for HashMap { fn default() -> Self { #[cfg(has_random)] let inner...
> To add to this discussion: Sometimes you want to explicitly have deterministic behaviour. E.g. when writing tests. In particular, with property based tests it is really desirable that the...
I think the usual strategy is to just wait for libstd to implement it and not get too hasty with a patch we'll have to revert once libstd gains support....
Can you run these examples with logging enabled?
There is also a [`portable-atomic`](https://crates.io/crates/portable-atomic) crate that implements atomic operations without using an external `critical-section` at all. IIRC either approach would work.
This crate uses Mutexes to secure its interior data, so it would be difficult to port to `no_std`. That being said, I would accept a PR that replaces the mutexes...
My personal vote is for `fork(&self)`.
I rebased on master, implemented the changes I made in #92 in this branch, and reimplemented the new system such that it only exposes the fallback when compiled for `target_family...
Now that I can test the benchmarks, it seems that it's regressed to an almost unacceptable degree.  I'm not entirely sure where the extra overhead is coming from, I'll...