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++
Describe the enhancement requested
The current implementation of
base64_decodevalidates characters usingbase64_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++