aik-jahoda commented on issue #96:
URL: https://github.com/apache/arrow-dotnet/issues/96#issuecomment-3352544564

   I think it is reasonable to fallback to BigInteger for Decimal256 if we 
don't want to introduce 256bit math. Pre-alocation of all powers of 10 should 
be a significant improvement already.
   
   I did a quick benchmark 
https://github.com/aik-jahoda/arrow-dotnet/commit/5cdf906379abee638c966f1db858e098b5c24ee1
 where the Int128 is faster than SqlDecimal approach. I would suggest doing an 
Int128 conversion on .net7+ and SqlDecimal for the previous versions.
   
   | Method            | Mean     | Error    | StdDev   | Allocated |
   |------------------ |---------:|---------:|---------:|----------:|
   | SqlDecimalConvert | 31.22 ns | 0.665 ns | 1.389 ns |         - |
   | Int128Convert     | 12.82 ns | 0.293 ns | 0.274 ns |         - |


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