Reranko05 opened a new pull request, #49748:
URL: https://github.com/apache/arrow/pull/49748

   ### Rationale for this change
   
   The current implementation of `base64_decode` validates characters using 
`std::string::find` for each byte, which introduces unnecessary overhead due to 
repeated linear searches.
   
   This change replaces those lookups with a precomputed 256-entry lookup 
table, enabling constant-time validation and value lookup per character.
   
   ### What changes are included in this PR?
   
   - Introduced a static lookup table (`kBase64Lookup`) to map base64 
characters to their corresponding values
   - Replaced `std::string::find` with constant-time table lookup for character 
validation
   
   ### Are these changes tested?
   
   Yes. Existing base64 decoding behavior remains unchanged and continues to 
pass all current tests. This change is a performance optimization and does not 
alter functional output.
   
   ### Are there any user-facing changes?
   
   No. 
   
   This change is internal and does not affect public APIs.
   
   GitHub Issue: https://github.com/apache/arrow/issues/49720
   


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

Reply via email to