3 ms·
BCD for money like datatype makes a lot's of sense but there a strange lack of support for it in x64 (while the support in x86 was so anemic as to be almost use
by nick__m 2y ago
BCD for money like datatype makes a lot's of sense but there a strange lack of support for it in x64 (while the support in x86 was so anemic as to be almost useless). Easy to implement correct low-level financial math operations seems to be reserved to the mainframe!
Does anyone know why Intel publish a DFP (decimal floating point) library instead of pushing those instructions down to the microcode level like the mainframes do ?
- KerrAvon 2y agoI don’t specifically know Intel’s thinking, but the usual conclusion from CPU designers is that decimal instructions are so rarely used that it’s not worth allocating silicon budget to them.
- adgjlsfhk1 2y agoprobably because in the GHz era none of this has to be fast anyway. financial programs will be spending all their time waiting for disk or network anyway. it's pretty hard to imagine a program that needs to care about decimal floating point in finance that would be slow at a human scale as a result of doing this in software