Geethapranay1 opened a new pull request, #3531:
URL: https://github.com/apache/fory/pull/3531

   **Optimize float16 sign symmetry test to fix ASAN slow down**
   
   
   <!--
   **Thanks for contributing to Apache Fory™.**
   
   **If this is your first time opening a PR on fory, you can refer to 
[CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).**
   
   Contribution Checklist
   
       - The **Apache Fory™** community has requirements on the naming of pr 
titles. You can also find instructions in 
[CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).
   
       - Apache Fory™ has a strong focus on performance. If the PR you submit 
will have an impact on performance, please benchmark it first and provide the 
benchmark result here.
   -->
   
   ## Why?
   
   <!-- Describe the purpose of this PR. -->
   
   ## What does this PR do?
   The `SignSymmetryForNonNaNBitPatterns` test was doing a massive brute-force 
scan across ~41k float32 patterns. Under ASAN, the heavy memory instrumentation 
caused this single test to take ~246 seconds.
   Instead of scanning the whole range, this rewrites the test to just densely 
sample the actual critical boundaries (subnormals, underflow/overflow 
thresholds, and normal bins). We get the exact same edge-case coverage, but the 
test now finishes in just **~13ms**.
   <!-- Describe the details of this PR. -->
   
   ## Related issues
   fix: #3524
   <!--
   Is there any related issue? If this PR closes them you say say fix/closes:
   
   - #xxxx0
   - #xxxx1
   - Fixes #xxxx2
   -->
   
   ## AI Contribution Checklist
   
   <!-- Full requirements and disclosure template:
   
https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs
 -->
   
   - [ ] Substantial AI assistance was used in this PR: `yes` / `no`
   - [ ] If `yes`, I included a completed [AI Contribution 
Checklist](https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs)
 in this PR description and the required `AI Usage Disclosure`.
   
   <!-- If substantial AI assistance = `yes`, paste the completed checklist and 
disclosure block here. -->
   
   ## Does this PR introduce any user-facing change?
   
   <!--
   If any user-facing interface changes, please [open an 
issue](https://github.com/apache/fory/issues/new/choose) describing the need to 
do so and update the document if necessary.
   
   Delete section if not applicable.
   -->
   
   - [ ] Does this PR introduce any public API change?
   - [ ] Does this PR introduce any binary protocol compatibility change?
   
   ## Benchmark
   normal build:
   <img width="1125" height="650" alt="Screenshot From 2026-03-30 21-54-21" 
src="https://github.com/user-attachments/assets/da74ac5a-8739-45eb-b385-30bc494ecebc";
 />
   asan build:
   <img width="1106" height="883" alt="Screenshot From 2026-03-30 21-55-36" 
src="https://github.com/user-attachments/assets/43eed5c6-f5c3-4fc9-aed4-07d43a39b650";
 />
   
   
   ASAN runtime down from 246s to 13ms!  
   <!--
   When the PR has an impact on performance (if you don't know whether the PR 
will have an impact on performance, you can submit the PR first, and if it will 
have impact on performance, the code reviewer will explain it), be sure to 
attach a benchmark data here.
   
   Delete section if not applicable.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to