Through the LLVM-MOS project it is now possible to target the MOS 6502 architecture as found in the Commodore 64, Apple II, and many other 1980s micro computers. Here's a comparison of a plasma effect programmed in C and Rust, respectively.
- The Rust source code is available here: [ Ссылка ]
- The C source is available here: [ Ссылка ]
- In the initial dot "..." phase, a character set is being generated. When recording the video, Rust used a slower random number generator than C, which is why Rust is initially more sluggish. In the linked source, Rust and C used the same random number source, whereby the pre-calculation step is the same for C and Rust.
- Both C and Rust uses LLVM-MOS for code generation.
- The PRG files are around 1 kB; the C version slightly less than the Rust version.
Ещё видео!