<h1>Tech Notes</h1><h2>Forcing Registers for Floating Point Math</h2><p>Generally speaking, single and double precision variables are stored in memory. But when you need a bit of extra speed, you can ask FutureBASIC to store those items in floating point registers. Then instead of moving a variable from memory to a register, performing an operation, and moving it back, the operation is simply performed on the register variable. Two steps are saved.</p>
<p>All you need to do is change the way you dimension the floats. Those dimensioned before a local function name will be in registers. Those that come after the name will be in memory.</p>
<pre>
Local
Dim as double regFloat1 , regFloat2 <---- in registers
Local Fn myCoolThinker ( Param1 as long , Param2 as Double )
Dim as double memFloat1 , memFloat2 <---- in memory