curve: rework precomputed storage