arrow icon indicating copy to clipboard operation
arrow copied to clipboard

[C++] Optimize base64_decode validation using lookup table

Open Reranko05 opened this issue 7 months ago • 1 comments

Describe the enhancement requested

The current implementation of base64_decode validates characters using base64_chars.find() per byte, which results in repeated linear searches.

This can be optimized by using a 256-entry lookup table (byte → sextet or invalid marker), allowing validation and decoding in a single pass with O(1) lookup.

This was identified during PR review and deferred to a follow-up.

Related: #49660

Component(s)

C++

Reranko05 avatar Apr 13 '26 17:04 Reranko05

Issue resolved by pull request 49748 https://github.com/apache/arrow/pull/49748

kou avatar Apr 18 '26 07:04 kou