Ok. I know a thing or two about land surveying software on the 50g. . . :-)
I assume all of the program is in userRPL since nothing else was specified. Feel free to correct me if needed.
Are you writing and accessing data (points or raw) from the SD card itself? If so, that is probably the largest speed hit. I'd recommend keeping data locally in HOME, and then writing it out to the SD card or port2 with some kind of backup routine. The rest of the commands should be organized into a library or a collection of libraries if you haven't done that yet.
That is what is going on with the surveying software I made. Basically, the program libraries reside in port2, and all variables are created in the hidden directory in HOME. The point database is stored in unused internal system RAM and is read in from the SD card using some C software. The only time it accesses the card is when loading or saving points, writing the RW5 info, saving a copy of current job/software settings, or accessing the code attribute file. In short, only times when speed isn't all that critical as it can take a second or two for some of the operations.
If that doesn't give you some ideas on what to do, or if you'd like some help with it, feel free to email me directly at timwessman_a_t_gmail.com