Skip to content

Comments

Specialize GEProjDouble with feSquare#11

Merged
koba-e964 merged 4 commits intomainfrom
geprojdouble-only
Feb 1, 2026
Merged

Specialize GEProjDouble with feSquare#11
koba-e964 merged 4 commits intomainfrom
geprojdouble-only

Conversation

@koba-e964
Copy link
Owner

@koba-e964 koba-e964 commented Feb 1, 2026

Benchmark results (Apple M2, go test ./secp256k1 -run=^$ -bench='GEJacobianPoint_|GEProjPoint_' -benchmem -count=5)

Main (origin/main @ 7761398):

  • BenchmarkGEJacobianPoint_VariableTime_Short-8: 4206 ns/op
  • BenchmarkGEJacobianPoint_VariableTime_Long-8: 1220375 ns/op
  • BenchmarkGEJacobianPoint_ConstantTime_Short-8: 1466087 ns/op
  • BenchmarkGEJacobianPoint_ConstantTime_Long-8: 1412107 ns/op
  • BenchmarkGEProjPoint_ConstantTime_Short-8: 909115 ns/op

geprojdouble-only:

  • BenchmarkGEJacobianPoint_VariableTime_Short-8: 5368 ns/op
  • BenchmarkGEJacobianPoint_VariableTime_Long-8: 1276801 ns/op
  • BenchmarkGEJacobianPoint_ConstantTime_Short-8: 1487202 ns/op
  • BenchmarkGEJacobianPoint_ConstantTime_Long-8: 1445619 ns/op
  • BenchmarkGEProjPoint_ConstantTime_Short-8: 918919 ns/op

Delta vs main:

  • BenchmarkGEJacobianPoint_VariableTime_Short-8: +27.63%
  • BenchmarkGEJacobianPoint_VariableTime_Long-8: +4.62%
  • BenchmarkGEJacobianPoint_ConstantTime_Short-8: +1.44%
  • BenchmarkGEJacobianPoint_ConstantTime_Long-8: +2.37%
  • BenchmarkGEProjPoint_ConstantTime_Short-8: +1.08%

Follow-up sanity check (Feb 1, 2026):
go test ./... -bench=GEProjPoint_ConstantTime =>
BenchmarkGEProjPoint_ConstantTime_Short-8: 992828 ns/op (0 B/op, 0 allocs/op)

Note: this PR now also adds a skills note with these benchmark results in skills/issue-8-complete-addition.md.

@koba-e964 koba-e964 linked an issue Feb 1, 2026 that may be closed by this pull request
@koba-e964
Copy link
Owner Author

Benchmark results seem fragile. I confirmed that on GitHub Action runners the performance improved somewhat. Merging

@koba-e964 koba-e964 merged commit 4791f6f into main Feb 1, 2026
2 checks passed
@koba-e964 koba-e964 deleted the geprojdouble-only branch February 1, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete addition formulas for prime order elliptic curves

1 participant