You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we use this decimal library at production and it works really well for last a few years.
The only minor complain is that some times (during profiling) we noticed that some operations are slow (e.g. sql serialization and multiplication). Most of slowness is from big.Int related operations. Therefore, we tried an approach to optimize (our) common cases by represent decimal numbers with int64 instead of big.Int and this resulted 5x to 100x speedup.
I too encountered this problem. However, I utilized uint64 for storing the coefficient. Consequently, a decimal can't have more than 19 digits. It is more than enough for monetary calculations.
Hi @gyson, @eapenkin! :D Thanks for your amazing work and for making those libraries available to everyone. They look quite promising :D In PR #363 I've introduced a new docs section Alternative libraries when I've briefly mentioned your work. Please take a look and let me know if you are happy with such a description :D
we use this decimal library at production and it works really well for last a few years.
The only minor complain is that some times (during profiling) we noticed that some operations are slow (e.g. sql serialization and multiplication). Most of slowness is from
big.Int
related operations. Therefore, we tried an approach to optimize (our) common cases by represent decimal numbers withint64
instead ofbig.Int
and this resulted 5x to 100x speedup.We'd like to share our result and made our approach open-sourced as well: https://github.com/alpacahq/alpacadecimal
this is to share an optimization idea that maybe works for others.
this is not an issue. be free to close it.
The text was updated successfully, but these errors were encountered: