4 ms·
Super interesting product I'll definitely be taking a deeper look at this when I'm at work tomorrow. I notice all your comparisons are with floating point and
by SimonPStevens 7y ago
Super interesting product I'll definitely be taking a deeper look at this when I'm at work tomorrow.
I notice all your comparisons are with floating point and integer types. I was recently looking at SIMD as a possible way to speed up some of our calculations. But we create financial software and most data is typically stored as decimals not floating points to avoid problems with binary floating point precision during calculations.
Does quest handle decimals, just without the SIMD speed up?
Is this just a dead end? Are there any SIMD implementations that deal with decimal numbers? I considered Hacky workarounds like using integer based types internally and then treating them as as fixed point decimals for display but that doesn't give enough range for my purposes.
- bluestreak 7y agoThanks! What sort of decimal type is it?
- SimonPStevens 7y agoWell in code we're using C#'s decimal type (128 bit. 96 bits are used for an integer and the rest used for the sign and scaling factor) [0]. It's essentially just floating point applied to a base 10 integer rather than a binary one. In the SQL server database the column types are usually decimal(18,5) or decimal(25,12) [1] [0] - https://docs.microsoft.com/en-us/dotnet/api/system.decimal?view=netframework-4.8 https://docs.microsoft.com/en-us/dotnet/api/system.decimal?v... [1] - https://docs.microsoft.com/en-us/sql/t-sql/data-types/decimal-and-numeric-transact-sql?view=sql-server-ver15 https://docs.microsoft.com/en-us/sql/t-sql/data-types/decima...
- bluestreak 7y agothanks! Someone else also pointed at lack of 128-bit long support. It looks as if long128 might help here.
- throwaway_pdp09 7y agoCan't you just use a binary int with the few bits being an implicit fraction (or just count in 'pennies' AKA the lowest denominction of that currency). Seems a straightforward solution, no?