If say a Lua scripted app is likely to hit the limits of a PIC32 with 512KB SRAM, then it would probably make more sense to use an SBC instead. A PIC32 with an FPU would make it easier for me to do calculations and drive a robot arm directly (and Lua scripting will make it much more fun) but I would find an SBC if I wanted to do robot vision. In short, pick parts based on a target application and not the other way round.
Today, a non-FPU PIC32 512KB SRAM is about USD10 for 10+ pieces. Looking at a nice Wikipedia page , I can dig a bit and find at Olimex an Allwinner A13 board for EUR18 (qty 1), it has 256MB DDR3 RAM. Both are very affordable.
So although it's possible to modify Lua for optimal SRAM/Flash utilization, I would just pick an SBC if an app is too big for a single IC. IC manufacturing advances wins again. :-)
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia