Earlier quoted context omitted.
> When you need efficient trees or graphs (I doubt any non-trivial software doesn’t need at least one of them), unsafe code is the only reasonable choice. To name one example, the AnimationGraph in Bevy is implemented with petgraph, which is built using adjacency lists, and doesn't use any unsafe code in any of the parts that we use. It is very high-performance, as animation evaluation has to be.
> It is very high-performance, as animation evaluation has to be Are you sure evaluating these animations is performance critical? I doubt games have enough data to saturate a CPU core doing that. Screens only have 2-8 megapixels; animated objects need to be much larger than 1 pixel. If you animate bones for skeletal animation that’s still not much data to compute because real life people have less than 256 bones. Yo…
Isn't this obviously true? A key part of UI work is avoiding "jank", which commonly refers to skipped frames.
> I doubt games have enough data to saturate a CPU core doing that.
Got a bit lost here: games?
> Screens only have 2-8 megapixels.
4 bytes per pixel, 32 MB/frame. 120 frames / sec = 8 ms/frame. 3.84 GB/second.
> animated objects need to be much larger than 1 pixel.
Got lost again here.
In general, I'm lost.
First, there's a weak claim that all performant data structures in Rust must use unsafe code.
I don't think the author meant all performant data structures must use unsafe code.
I assume they meant "a Rust data structure with unsafe code will outperform an equivalent Rust data structure with only safe code"
Then, someone mentions a 3D renderer, written in Rust, is using a data structure with only safe code.
I don't understand how questioning if its truly performant, then arguing rendering 3D isn't that hard, is relevant.