News for hackers. Stuff that matters.
Re:Rust vs C Pitfalls by Manishearth on Wednesday December 28, 2016 @01:11PM (#13272342)
Thread locals are thread local, so you don't need AtomicUsize, you just need a Cell, which has zero overhead.

https://is.gd/c0iCz6

Edit: Zero overhead as compared to C, that is. Cell has a slight overhead in Rust because it prevents certain optimizations that aren't the default in C.

Re:Rust vs C Pitfalls by burntsushi on Wednesday December 28, 2016 @01:19PM (#13272396)
Derp. Thanks for that correction. :-)