Re:When Zig Outshines Rust – Memory Efficient Enum Arrays
by wiz21c on Monday September 18, 2023 @04:04PM
(#37561246)
133Mhz, that's 133 cycles per instruction for a 6502 (assuming you emulate only the 6502). Seems doable but then there's the BCD stuff and that's rather tough emulate (you'll definitely need a lot of cycles to reproduce that)...
But that sounds real cool. Would you share you project ?
Re:When Zig Outshines Rust – Memory Efficient Enum Arrays
by raphlinus on Monday September 18, 2023 @04:26PM
(#37561538)
It's a bit tricky, but my decimal adc is 19 lines of code, all of which is fairly straightforward, mostly bit fiddling stuff that I expect will compile to a few instructions each.
I need to go through an open source releasing process but I'll get that going. Thanks for your interest!
I started mine about 6 years ago, put it on the shelf, and am getting back to it. Overall I think Rust is working well for it (and for pico DVI out), but I can also see the advantages of Zig for something this low-level and specialized.