andygrove opened a new pull request, #4918:
URL: https://github.com/apache/datafusion-comet/pull/4918

   > This PR was created by an LLM as a draft PR. I will mark it as ready for 
review after human review.
   
   
   ## Which issue does this PR close?
   
   N/A — autonomous exploratory PR.
   
   ## Rationale for this change
   
   Format float-to-string casts straight into a GenericStringBuilder with a 
reused scratch buffer instead of allocating a String per row (and a second one 
in the scientific-notation path), removing one malloc/free and one copy per 
value.
   
   ## What changes are included in this PR?
   
   Format float-to-string casts straight into a GenericStringBuilder with a 
reused scratch buffer instead of allocating a String per row (and a second one 
in the scientific-notation path), removing one malloc/free and one copy per 
value.
   
   ## How are these changes tested?
   
   Correctness: unit tests + seeded differential fuzz (bit-identical Arrow 
output vs `main`).
   
   Benchmark (criterion):
   
   - cast_f32_to_utf8: 42.453% faster (base 408097ns -> cand 234847ns)
   - cast_f64_to_utf8: 41.57% faster (base 418096ns -> cand 244294ns)
   
   Full criterion output:
   
   ```text
   cast_float_to_string/cast_f64_to_utf8
                           time:   [243.85 µs 244.03 µs 244.23 µs]
                           change: [−41.767% −41.570% −41.425%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 4 outliers among 100 measurements (4.00%)
     2 (2.00%) high mild
     2 (2.00%) high severe
   cast_float_to_string/cast_f32_to_utf8
                           time:   [234.71 µs 234.86 µs 235.08 µs]
                           change: [−42.515% −42.453% −42.390%] (p = 0.00 < 
0.05)
                           Performance has improved.
   Found 6 outliers among 100 measurements (6.00%)
     2 (2.00%) low mild
     1 (1.00%) high mild
     3 (3.00%) high severe
   ```
   
   
   


-- 
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