neilconway opened a new issue, #20302:
URL: https://github.com/apache/datafusion/issues/20302

   ### Is your feature request related to a problem or challenge?
   
   translate() in DF is ~1.8x slower than the implementation in DuckDB (per 
[datafusion-benchmarks](https://github.com/apache/datafusion-benchmarks)). The 
DF implementation of translate could be optimized as follows:
   
   • If the second and third arguments are both constants (common case), we can 
build the lookup map once per batch of inputs, rather than clearing and 
rebuilding it for every input string in the batch
   • If all arguments are ASCII-only, we can build a fixed-size (128 entry) 
lookup table mapping ASCII characters directly, rather than using a hash table.
   
   Likely other optimizations are possible as well, but implementing those two 
ideas should be a substantial win
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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