Fast formulas

The OctoMY spreadsheet is not an interpreter walking your formulas one cell at a time. When you finish an edit, the whole sheet is compiled — turned into the same kind of program a graphics card runs — and then evaluated as one piece.

You do not have to do anything to get this. This page explains what it means in practice: what is fast, what is not compiled at all, and what to expect on a large sheet.


What "compiled" buys you

A normal spreadsheet re-evaluates cells by walking a dependency graph, cell by cell, every time something changes. OctoMY instead generates one program for the entire sheet and runs that.

Two things follow:

Evaluation is fast and stays fast as the sheet grows. The per-cell overhead that dominates a cell-at-a-time engine is not there — the cells become local variables in a single routine.

The same formula runs everywhere. The expression you type in a cell is the same language that drives FACS rigs and Construct varset entries, and it is compiled by the same front end. A formula that works in the sheet works in a face rig, and it computes the same numbers there.

What is fast

Arithmetic, comparisons, the built-in maths functions, vectors and matrices, conditionals, and references to other cells. These are what the sheet is built for, and there is nothing to avoid:

A1 = 5
B1 = =sin(A1) * 2 + cos(A1)
C1 = =clamp(B1, -1, 1)
D1 = =vec3(A1, B1, C1)
E1 = =length(D1)

What is not compiled

Text. A cell holding words is not part of the program. Formatting, labels and headings are display, and they never reach the compiled path. You can put text anywhere in the sheet without slowing anything down.

Empty cells that nobody reads. A blank cell only becomes part of the program if a formula refers to it. A 60 × 60 grid with four formulas in it compiles those four formulas and the handful of cells they read — not 3 600 cells.

What editing costs

Every edit recompiles the sheet, because the sheet is one program. That cost scales with how many formula cells you have, not with the size of the grid:

Formula cells Time to recompile after an edit
~100 around ten milliseconds
~1000 around a tenth of a second

Ranges rather than figures on purpose. Measured on a desktop machine, the same sheet recompiles anywhere within about ±50% of those numbers from one run to the next — that is the machine's own state (clock speed, which cores it lands on, what else it has cached), not the sheet's. What holds steady is the shape, and the shape is the part you can plan around: a sheet of a few hundred formulas recompiles faster than you can type the next character, and a sheet of several thousand starts to be noticeable.

Reopening an unchanged sheet is far faster than the first compile — a few milliseconds even at a thousand formulas — because the compiled result is kept and reused when the formulas have not changed. What you pay for is changing a formula, not having one.

Pro Tip

If you are pasting a large block of formulas, the sheet recompiles once for the paste rather than once per cell. The same applies to any bulk edit.

Where it runs

The compiled sheet runs on your CPU by default. The same program can also run on the graphics card, which is what makes it worth compiling this way at all — the sheet and a GPU-driven face rig are then literally the same program.

The sheet tells you which one answered, under the grid:

The lane indicator under the sheet, reporting which lowering evaluated it

It reads not compiled when there is nothing to run — an empty sheet, or one whose formulas were refused. That is worth watching: a sheet that stopped compiling three edits ago otherwise looks exactly like one that never had a formula in it.

You do not pick this per sheet. Where the choice is offered — mesh export, which evaluates a field millions of times — the export page explains what the three evaluators mean and why they agree.

What it does not change

The sheet is still a spreadsheet. = means calculate, A5 means cell A5, and none of the above requires you to learn the language underneath. If you never write vec3, you never meet it.

See also

In this section