i pray i dont offend anyone with this BUT...
using a higher level language than assembly isn't going to cut it on these ecu's Ford has tried it with Pascal F and their own custom language 'FACT' The Pascal F code took twice as much memory and ran some 60% slower. The FACT code took about 81% more rom and ran slower. The cost of the hardware meant that hand coding assembly code was cheaper to do!
i've concluded the same in my own endeavors, in the d.e.c. i have a prioritizing strategy based on a timer, the only way i was able to keep the calculations fast enough is to allow the loop to skip some sub-routines if it calculates that the alloted time exceeds the time required to complete that calculation, that routine then gets throw on the stack and when (and if) its number comes up in one of the next loops it then gets calculated, there is a bunch of failsafes and check variables for it though in the rest of the loop depending on its priority
so... for example, at WOT the egr routine is skipped and given a priority number, the problem is that the egr feedback sensor(s) are ONLY read and the egr position/flow is calculated in that routine, however, when the tps exceeds the WOT breakpoint, theres an interrupt that runs the WOT routine (only once), in that routine the egr flow is set to 0, if its value is anything other than 0, then in that same routine the egr valve pw is written to 0, in a later loop when (and if) the egr routine's priority number comes up, it then calculates the time required to make that calculation, if the time alloted doesn't excced the time required the egr routine will then be executed, the first command in that routine reads the feedback sensor(s), the next section of that routine is skipped where egr flow and what not is calculated since its criteria won't be met at WOT, after it skips down to the end of that routine it will then compare the egr feedback position to the maximum closed valve value to make sure that the valve is actually closed, if its not it'll set a fault code P0406 "egr circuit high" as well as a failed variable that gets passed on to the EGT routine to compare exhaust temps (if the sensor is present) to actual to see if it is indeed stuck open, if the EGT deviates from its typical value during those conditions then the "egr excessive flow" fault code gets set P0402
its a tad more involved since i have egr intertwined with variable cam timing for engines so equipped but you get the idea