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
I'm wondering why the library uses decimal instead of float (or even double) which would have the range to represent any physically plausible dimension. As decimal isn't hardware-native performance of operations can reasonably be expected to be significantly slower.
A (very) quick search for some backing evidence suggests...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm wondering why the library uses decimal instead of float (or even double) which would have the range to represent any physically plausible dimension. As decimal isn't hardware-native performance of operations can reasonably be expected to be significantly slower.
A (very) quick search for some backing evidence suggests...
"Addition, subtraction, multiplication, comparison operations on decimal are ~15 times slower than operations on long or double; division is ~30 times slower."
https://stackoverflow.com/questions/366852/c-sharp-decimal-datatype-performance
(As the library code is around a few 1000 LOC I may try this...)
Beta Was this translation helpful? Give feedback.
All reactions