EDIT: After playing with this a bit more, I think it's probably not a big deal? Looking at the memory map doesn't show it growing in my tests. Sorry for the confusion!
Hi there! I've gotten my Lua game to the point where I'm starting to work on performance optimization. I've been struggling with memory allocations, and was hoping someone here could tell me if what I'm seeing is expected/can be improved somehow on my end.
From my testing, it seems like there's a ~500-1200 byte per frame malloc penalty for using Lua, generally. I set up test projects in Lua and C that just clear the background every frame to confirm: Playdate memory test · GitHub.
As mentioned in the gist, the simulator shows the Lua version malloc 450 bytes per frame doing nothing at all, and an additional 816 bytes from calling
Hopefully that makes sense, and please let me know if there's any additional information I can provide.