Skip to content

Conversation

@kunxian-xia
Copy link
Collaborator

@kunxian-xia kunxian-xia commented Dec 18, 2025

Summary

This is a follow-up work of #1175.

We don't need to write next_layer_evals to the three point_and_evaluations array in each layer. Therefore we can get rid of the cost of two for-loops.

  1. builder.range(0, num_prod_spec).for_each();
  2. builder.range(0, num_logup_spec).for_each().

Performance impact

With 10k keccak invocations, the number of cycles spent in Ecall_Keccak's tower verifier is reduced.

shard 0 shard 1 shard 2
before 423951 737341 707351
after 277885 (~140k, 35%⬇️) 323029 (~410k, 56%⬇️) 317425 (~390k, 55%⬇️)

The overall cycles looks like this.

shard 0 shard 1 shard 2
before 3908867 5008107 5174633
after 3749371 (3%⬇️) 4583889 (8%⬇️) 4768503 (8%⬇️)

@kunxian-xia kunxian-xia requested a review from darth-cy December 19, 2025 02:07
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.

2 participants