I wanted to get some timings for PLASMA vs C for a few operations. I’m sticking with my “moving monster” theme and tracked the time for doing two different operations.
- Drawing a frame of the monster (100 times), which involves
- Flipping HGR pages
- Getting the page address, getting Y address (lookup), the byte for X (lookup) and adding them together
- Getting frame for X (lookup) and calculating the offset to get to the correct frame
- Memcpy() the data to memory
- Do a simple no op for loop from 1 to 500 (100 times)
I fully admit that this is not an exhaustive test, but I just wanted to get an idea of how they compare. Again, this is not a “C is faster/better” post. PLASMA is impressive tech regardless of the times. It’s just out of my pure curiosity.
I added pretty much identical timing routines on the PLASMA and C side (after much time spent banging my head), but I’ll post on that later.
Results
Note: Times are in cs (centiseconds, i.e. 100ths)
100 Frames
C: 147 cs
PLASMA: 228 cs (155%)
Loop 500
C: 530 cs
PLASMA: 1368 cs (258%)
Videos
Because, I like videos.