i often say that fixing the money won't fix the world. there are many more things than money holding us back.
but money is powerful, and bitcoin challenges it directly. our conclusion should be that money will be used to destroy bitcoin. a lot of money.
if a trillion dollars can destroy bitcoin, bitcoin is already dead
y'all...
> damn, that's a long time. what can we do about that?
● The expensive part is computing Ed25519 constants at runtime — field inversions with ~254 squarings each. These are fixed mathematical constants. We can just precompute them at build time in SBCL and embed them in the kernel.
Let me see exactly what ed25519-init computes.
● Searched for 1 pattern, read 1 file (ctrl+o to expand)
● The only expensive computation is (fe-invert (fe-from-int 121666)) on line 9626 — one field inversion (~254 squarings). Everything else is just loading hardcoded constants and doing a couple multiplications.
The simplest fix: precompute d as a 10-limb field element at build time and store it directly, eliminating the inversion entirely.
● Searched for 1 pattern, read 1 file (ctrl+o to expand)
● So fe-store-fixed writes 10 × 32-bit limbs to a fixed memory address. The d constant goes to 0x05060500. I can compute d in SBCL at build time and emit mov instructions to write the 10 limbs directly into memory during boot, or better yet — just precompute the limb values and have ed25519-init write them directly instead of calling fe-invert.
Let me compute d in SBCL.