| | @@ -5,56 +5,9 @@ |
| 5 | 5 | stopping for the owner's review. A finished milestone is cut from this |
| 6 | 6 | file: git keeps the history, and the report's section 12 the language's. |
| 7 | 7 | |
| 8 | | -v0.9.0, better code for reals, with `Bytes` and slices in code |
| 9 | | -procedures (reports 2026-10.18 and 10.19), is tagged by the owner's |
| 10 | | -word. All before v0.7.1 is approved by the owner; v0.7.1, the |
| 11 | | -manual, v0.8.0, better code again, and v0.9.0 wait for the owner's |
| 12 | | -review. v0.9.1, by the owner's word, adds `tools/` to the tarball, |
| 13 | | -for the programs that build with the raz on PATH: rat, rterm, rloc. |
| 14 | | - |
| 15 | | -## Done: better code for reals |
| 16 | | - |
| 17 | | -For: code with reals near FPC `-O2`'s, as integer code is. raz keeps a |
| 18 | | -real in an integer register and copies it to xmm0 or xmm1 and back |
| 19 | | -for each operation; its variables are always in memory. A 2-D Jacobi |
| 20 | | -sweep took 3.1 times FPC's time. No change to the language. Each step |
| 21 | | -is measured on the kernels and on rat, as v0.8.0's were, and one that |
| 22 | | -buys less than 2% on both is reverted and noted here. |
| 23 | | - |
| 24 | | -1. Done: **Two kernels of reals.** `test/bench/Jacobi`, a sweep of a |
| 25 | | - grid of `F64`s, each point the mean of its neighbours: loads, adds |
| 26 | | - and a constant; and `NBody`, bodies under gravity: real variables, |
| 27 | | - a square root and a division in the inner loop. raz 3.1 and 4.4 |
| 28 | | - times FPC's time. |
| 29 | | -2. Done: **Reals on the stack in xmm registers.** A real on the value |
| 30 | | - stack is held in xmm8 to xmm11, loaded and stored there with |
| 31 | | - `movsd`, a constant read from read-only data, and an operation takes |
| 32 | | - its right operand from memory as it is. Jacobi 251 ms to 129, NBody |
| 33 | | - 375 to 225; rat within noise. |
| 34 | | -3. Done: **An element of an array as the machine has it.** NBody's |
| 35 | | - time went mostly to its addresses, not its reals: `x[i]`, of an |
| 36 | | - array of the module, was a copy, a shift, a `lea` and an add before |
| 37 | | - its load. Now an element of an array in the frame or a chunk is the |
| 38 | | - operand `[base + i * 8]`, as one of a slice in registers is. NBody |
| 39 | | - 225 ms to 147; rat within noise. |
| 40 | | -4. Done: **An offset as the machine has it.** Jacobi's index |
| 41 | | - arithmetic, `s[i * N + j - 1]`, added its constant before the load; |
| 42 | | - now a word's constant offset waits on the stack, carried through |
| 43 | | - `+`, `-` and `*` by a constant, and an element's operand takes it as |
| 44 | | - its displacement: `[r13 + r9 * 8 - 8]`. Jacobi 129 ms to 106; rat |
| 45 | | - within noise. |
| 46 | | -5. Done: **Real variables in xmm registers.** The busiest four reals |
| 47 | | - of a procedure live in xmm12 to xmm15, each written through to its |
| 48 | | - slot, from which the trap report reads it and a call's return loads |
| 49 | | - it, as System V keeps no xmm register through a call. NBody 147 ms |
| 50 | | - to 116; rat within noise. |
| 51 | | - |
| 52 | | -All told: Jacobi 3.1 times FPC `-O2`'s time to 1.3, NBody 4.4 to 1.4; |
| 53 | | -rat and the integer kernels as they were; 9,131 lines of code. Left: |
| 54 | | -Jacobi's index, worked out for each element where FPC shares it, which |
| 55 | | -one pass can't; NBody's call to `Math.sqrt`, an instruction to FPC; |
| 56 | | -a comparison of reals that jumps without making a `BOOL`, which |
| 57 | | -neither kernel needs. |
| 8 | +v0.9.1, the latest release, is tagged by the owner's word. All before |
| 9 | +v0.7.1 is approved by the owner; v0.7.1, v0.8.0, v0.9.0 and v0.9.1 wait |
| 10 | +for the owner's review. No milestone is under way. |
| 58 | 11 | |
| 59 | 12 | ## Next, when the owner says |
| 60 | 13 | |