
comments
Want to use Twitter/X from the command line without a developer account or API key?
No
Nazi propaganda platform, no thanks
yup. saw that javascript yellow at the languages bar and lost all further interest
Yeah, Rust borrows memory model from C++ because it's already in use and is at least somewhat understandable
This doesn't appear optimal. The correct way to melt a CPU is to make use of as many functional units as possible in parallel, while avoiding pipeline stalls and cache misses. I'm not a Rust guy, but skimming through the code it seems like the only work it's doing is some integer math, so it's not even touching the FPUs. Also I see while running.load(Ordering::SeqCst). Idk if Rust's memory model is similar to C++, but does that mean it's using atomic operations? That's going to create a lot of unnecessary cache coherency traffic that works against the goal of melting. Each thread should have its own counter not shared with other threads, and it should only spawn enough threads for the number of physical cores (not logical cores) on the system, and ideally pin each thread to a single core to prevent the OS from acting like a firefighter.
The gpu parts I'm not sure about. There's might be some special consideration required when dealing with integrated graphics though.
Protein folding for example
At least use a SIMD load, and maybe someone would find it cool-adjacent.
Any embarrassingly parallel program can max out your CPU. You should probably run some useful problem instead.