In an electronic spreadsheet system for modeling user-specified information in a spreadsheet model, said spreadsheet model comprising a plurality of cells storing formulas and values calculated from said formulas, a computer-implemented method for recalculating the spreadsheet model, the computer-implemented method comprising:
- (a) receiving input specifying a formula for a particular cell;
- (b) converting said input into a sequence comprising operand and operator tokens, at least one of said operand tokens comprising a cell identifier for referencing a value stored in another cell;
- (c) for each cell identifier in step (b) which references a value stored in another cell, determining a memory address where the value for the cell is stored in system memory;
- (d) compiling said formula for the particular cell into a machine language sequence for execution by a target processor, said machine language sequence including said memory address for each cell identifier in step (b) which references a value stored in another cell;
- (e) storing in system memory the machine language sequence for the particular cell;
- and
- (f) recalculating the spreadsheet model by executing said machine language sequence stored in system memory.