3 ms·
> The only real correct solution here is to send mantissa and exponent as two separate integers. That’s essentially the same thing as a String-serialized big d
by lxgr 4mo ago
> The only real correct solution here is to send mantissa and exponent as two separate integers.
That’s essentially the same thing as a String-serialized big decimal, just less readable, no?
- gmm1990 4mo agoThat’s quite a bit slower to process. At least if you’re converting to integers to do the calculations and the calculations would be quite a bit slower if you kept the big decimal type
- lxgr 4mo agoTrue, but this is usually your least concern when you're dealing with monetary amounts/math.
- mnahkies 4mo agoThey specifically mentioned HFT so I suspect they care a lot about processing speed
- Maxatar 4mo agoIt might be your least concern, and that's fine but it's not the least concern for many people who need to process large volumes of transactions. Money, even within fintech, is a concept used across a wide variety of domains, and you can't assume that what concerns you is what concerns everyone else relying on it elsewhere.
- gmm1990 4mo agoI guess I’m coming at it from an optimizing market data provider perspective once you preallocate memory the next thing to optimize is the string decimal conversion if the feed isnt binary encoded