Skip to content

Revert "Faster floor_sqrt, checked_sqrt"#1304

Merged
tarcieri merged 1 commit into
masterfrom
revert-1258
Jun 22, 2026
Merged

Revert "Faster floor_sqrt, checked_sqrt"#1304
tarcieri merged 1 commit into
masterfrom
revert-1258

Conversation

@tarcieri

@tarcieri tarcieri commented Jun 22, 2026

Copy link
Copy Markdown
Member

This reverts commit add9780 (#1258).

As reported in #1303, this appears to be miscomputing results.

This reverts until we can track down the cause of the issue.

@tarcieri tarcieri requested a review from andrewwhitehead June 22, 2026 01:02
@tarcieri

Copy link
Copy Markdown
Member Author

cc @kayabaNerve

@tarcieri

Copy link
Copy Markdown
Member Author

Looks like there are some public APIs this removed:

  BoxedUint::floor_sqrt_assign_vartime, previously in file /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crypto-bigint-0.7.4/src/uint/boxed/sqrt.rs:104
  UintRef::carrying_add_assign_mul_limb, previously in file /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crypto-bigint-0.7.4/src/uint/ref_type/add.rs:100
  UintRef::borrowing_sub_assign_limb, previously in file /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crypto-bigint-0.7.4/src/uint/ref_type/sub.rs:8

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.63866% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.92%. Comparing base (ec6615f) to head (c715fad).

Files with missing lines Patch % Lines
src/uint/boxed/sqrt.rs 92.59% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1304      +/-   ##
==========================================
- Coverage   91.10%   90.92%   -0.19%     
==========================================
  Files         190      189       -1     
  Lines       22731    22493     -238     
==========================================
- Hits        20709    20451     -258     
- Misses       2022     2042      +20     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This reverts commit add9780.

As reported in #1303, this appears to be miscomputing results.

This reverts until we can track down the cause of the issue.
@tarcieri tarcieri changed the title Revert "Faster floor_sqrt, checked_sqrt (#1258)" Revert "Faster floor_sqrt, checked_sqrt" Jun 22, 2026
@tarcieri tarcieri merged commit 9d46a6b into master Jun 22, 2026
32 checks passed
@tarcieri tarcieri deleted the revert-1258 branch June 22, 2026 02:51
@tarcieri tarcieri mentioned this pull request Jun 22, 2026
tarcieri added a commit that referenced this pull request Jun 22, 2026
## Added
- `BoxedUint::{from_be_slice_truncated, from_le_slice_truncated}` (#1266)
- `Encoding::{from_bytes, to_bytes}` (#1297)
- `Uint::{from_be_slice_truncated, from_le_slice_truncated}` (#1299)
- `Limb::{from_*_bytes, from_*_slice_truncated, to_*_bytes}` as
  `const fn`s (#1300)
- `Encoding::{from_be_slice_truncated, from_le_slice_truncated}` trait
  methods (#1301)
- `ArrayEncoding::{from_byte_array, to_byte_array}` (#1302)

## Fixed
- Preserve `NonZero` and `Odd` invariants in `Zeroize` impls (#1287)
- `bitlen` performance (#1298)
- `floor_sqrt` regression (#1304)
- Truncated Karatsuba carry (#1305)
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