Finished optimizing the main drawing functions for uxn-playdate getting speedups ranging from 1.98x to 4.38x.
Only screen_fill missing and then it's time to do audio and filesystem stuff. At this point the playdate should be able to handle pretty much any rom you throw at it (within reason). I think there is full speed parity for Oquonie compared with uxnemu.
More testing is needed of course, and I could make things faster but not worth it until I can test on hardware.
Devine Lu Linvega
in reply to Bad Diode • • •that's sick! I was looking at the uxn core, and I think it could be to run faster.
Many times you increment the stack pointer each push and pop, I was wondering if it'd be faster to move it once, and write the values with an offset, so something like PUSH(a) PUSH(b) wouldn't load the ptr twice, just once and write a at -1 and b at -2.
Bad Diode
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to Bad Diode • • •Devine Lu Linvega
Unknown parent • • •Bad Diode
in reply to Devine Lu Linvega • • •@neauoire @sigrid you can do that on compiler explorer, just need to target the right CPU:
https://godbolt.org/z/8G35d8TKG
Or offline with:
arm-none-eabi-objdump -d build/pdex.elf
Compiler Explorer - C++ (ARM GCC 8.2.0)
godbolt.orgSigrid Solveig Haflínudóttir
in reply to Devine Lu Linvega • • •./build.sh --debug --no-run
gdb bin/uxnemu
(gdb) disassemble uxn_eval
Devine Lu Linvega
in reply to Sigrid Solveig Haflínudóttir • • •@sigrid aaah, that's cool I didn't know you could change target like that with godbolt.
Wouldn't that just give me x86 if I'm on the thinkpad?
Devine Lu Linvega
Unknown parent • • •Sigrid Solveig Haflínudóttir
in reply to Devine Lu Linvega • • •Bad Diode
in reply to Bad Diode • • •Devine Lu Linvega
in reply to Bad Diode • • •Bad Diode
in reply to Devine Lu Linvega • • •@neauoire it was calling ppu_pixel on a double loop, now I write 1 tile at a time, handling the corner cases and such.
Anyway I'm done for now with the optimization work, time to do some more practical stuff, like audio and some extra menu goodies.
The worst (best?) thing is that all this work gave me even more ideas for optimizing uxngba video drawing... hmmmmm
Devine Lu Linvega
in reply to Bad Diode • • •Bad Diode
in reply to Devine Lu Linvega • • •