Currently, Brc::new consistently benchmarks as 20-100% slower than Arc::new. While I consider 20% an acceptable slowdown, being 2x as slow as Arc::new is unacceptable.
This has been a problem for a real-world user. A post on reddit by @nynjawitay said
I clone them a bunch, but I call new a LOT in this app. I switched out all the Arcs in this app for Brc and startup went from taking 4 seconds to taking 13 seconds. It's not an open source project or I'd share more.
This is even worse than microbenchmarks would suggest.
I need to figure out why there is a slowdown at all. The only thing we do differently than Arc::new is load a TLS and execute a couple of very rarely taken branches.
Currently,
Brc::newconsistently benchmarks as 20-100% slower thanArc::new. While I consider 20% an acceptable slowdown, being 2x as slow asArc::newis unacceptable.This has been a problem for a real-world user. A post on reddit by @nynjawitay said
This is even worse than microbenchmarks would suggest.
I need to figure out why there is a slowdown at all. The only thing we do differently than
Arc::newis load a TLS and execute a couple of very rarely taken branches.