Talk:Changing How the Impact of Investments is Calculated/@comment-178.84.213.77-20151003102058

Ryu82, the creator of Idling to Rule the Gods ran into this problem while working on his idle game. He originally used BigInts, but decided to completely reprogram at some point because of performance issues. He is fairly active on the forum for his game, so he may be able to think with you. In fact, there may be other idle game creators that wouldn't mind sharing their solutions. Games like Swarm Simulator, AdCap and Clicker Heroes all have to deal with gigantic numbers.

An 'ugly' fix that I've seen used in other games is to simply not store anything below, say, 9 decimal accuracy and only include an exponential tag. So you literally loose any progress that is less than one billionth of your total. For example 1,234,567,890,123 would be stored as 123,456,789 e 4 and the final 123 would not be stored. Doing this efficiently requires some major reprogramming since you want your program to understand what this means without having to convert back to the full number every time you need to check dependencies, but if done correctly, this should reduce performance by a fixed amount rather than a scaling amount based on the size of the numbers.