Hacker News new | past | comments | ask | show | jobs | submit login

My suspicion is that the field is a fixed size for serialization inside a database table or something. Truly variable length fields are trickier to store and then subsequently iterate over non-sequentially.

When you say rational numbers, do you literally mean a fraction, or are you talking about a floating point representation? I'm not sure what a fraction would do over fixed point in this usage, and floating point is best avoided for anything finance related due to the fact that they're approximate.

They probably regret not just using 64-bit from the start, but on the other hand somebody likely saved a measurable amount of money on storage over the years. Potentially not worth the cost to figure out a workaround now, though.

Perhaps they could implement a rule where if the field equals MAX_UINT32, then the value must be looked up in an auxiliary database table. Depending on how much crufty code there is assuming 32-bit though, it may be their equivalent of y2k.




I meant a genuine fraction. So you have arbitrary precision.

Yes, variable length fields are a bit annoying. But my argument is that the exchange itself doesn't need to be that fast. And the market makers just need to be faster than each other.

(For anyone else, exchanges just need to be fast enough.)

Yes, just using a 64 bit integers is probably the easiest here.

Floats would be worse than my suggestion to use variable length rational numbers, for exactly the reasons you know.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: