News Score: Score the News, Sort the News, Rewrite the Headlines

Arc vs String, is Arc really faster?

I was watching The Primagen’s reaction to the video “Use Arc Instead of Vec” by Logan Smith, when after experiencing live-demo-syndrome, Prime raised the question whether or not cloning Arc<str> is always faster than cloning String, which I thought was a proposterous question, since malloc is obviously slow, since that’s what we’re always told. “Reduce allocations” is almost always the first thing to do when performing non datastructure-related optimisation. The short (and possibly incorrect) an...

Read more at blocklisted.github.io

© News Score  score the news, sort the news, rewrite the headlines