News for hackers. Stuff that matters.
Re:Speed of Rust vs. C by rbanffy on Saturday March 13, 2021 @05:26AM (#26445566)
The average cellphone today has more than 4 cores. A decent desktop can deal with 16 threads on 8 cores.

There is a lot of untapped parallelism readily available waiting for the right code.

Re:Speed of Rust vs. C by ShinTakuya on Saturday March 13, 2021 @06:08AM (#26445810)
It's not about number of available threads, the very act of scheduling tasks across multiple threads has scheduling and communication overheads, and in many situations actually ends up being slower than running it on the same thread.

That said, I think the original comment was rightly pointing out how easy it was to make the change and test it, which in this case did turn out to be noticeably faster.

Re:Speed of Rust vs. C by PicassoCTs on Saturday March 13, 2021 @06:26AM (#26445874)
Parallelization is the nuclear energy of comp science. Loads of potential, high risk reward and they would have gotten away with it, if it were not for those meddling humans. Its non-trivial and can only be handled by accomplished engineers. Thus it is not used - or is encapsulated, out of sight, out of reach of meddling hands. (CPU Microcode shovelling non-connected work to pipelines comes to mind / NN-Net training frameworks, etc.)
Re:Speed of Rust vs. C by eru on Saturday March 13, 2021 @08:23AM (#26446372)
> [...] or is encapsulated, out of sight, out of reach of meddling hands.

That's the real issue here! Most language have poor abstractions for parallelism and concurrency. (Many languages don't even differentiate between the two.)

Encapsulating and abstracting is how we make things usable.

Eg letting people roll hash tables by themselves every time they want to use one, would lead to people shooting themselves in the foot more often than not. Compared to that, Python's dicts are dead simple to use. Exactly because they move all the fiddly bits out of the reach of meddling hands.

Re:Speed of Rust vs. C by rbanffy on Saturday March 13, 2021 @06:34PM (#26451226)
> Exactly because they move all the fiddly bits out of the reach of meddling hands.

You don't even need to hide those out of reach. You just need to make it dead simple to use and pretty much nobody will want to touch the fiddly bits.

And those who do know they had it coming.

Re:Speed of Rust vs. C by eru on Sunday March 14, 2021 @01:15AM (#26453206)
Oh, definitely. You just need to make it so that people don't have to fiddle with it and don't fiddle with it by accident.

You seldom have to protect against malicious attempts. (But when you do, it's a much harder task.)