We know that using float or double is not the option where correct precision is necessary, and we know BigDecimal serves that purpose but we also know that it's about 100 times slower than regular primitive operations.
Now what do we do if speed is critical for us and we do really need precision?
I tried to store value of currency in slowest unit and store its conversion like 1 BTC = 100000000 satoshi but after few experiments its clear that you simply won't be able to store 100BTC in long, exceeds max possible value. Yes there is an option to sacrifice precision like storing microBTC and so on, but the problem is more global, how we design such thing with primitives?