Skip to content

Faster locate_points - #71

Merged
max-models merged 1 commit into
develfrom
claude/picnic-profiling-benchmark-c1qlvi
Nov 25, 2026
Merged

max-models merged 1 commit into
develfrom
claude/picnic-profiling-benchmark-c1qlvi

Conversation

@max-models

@max-models max-models commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

locate_points (Pyccel) is about twice as fast, with the same results: 35.7 -> 15.9 ns per point on the two-level hierarchy of picnic's negative-ion extraction case (63k points, one core).

The cell on each level was fine_x // span[level], which Pyccel compiles to py_floor_div_int64_t: a 64-bit integer division with Python's floor semantics, tens of cycles each, three per level. The indices are not negative and far below 2**26, so int(fine_x / span[level]) in double precision truncates to the same integer at a few cycles.

Tests: the patchwork suite passes locally (713 passed with the locate and patch tests); the outputs (found, cell, wrapped) match the previous kernel exactly on the captured case.

@max-models
max-models merged commit 9bf185d into devel Nov 25, 2026
27 checks passed
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.

1 participant