Tech
⚡ Why Integer no longer stores its value as a String
If you've used the experimental Integer type from Kotools Types before 5.2.0, you may have noticed arithmetic getting slower as numbers grew larger. That wasn't your imagination — it came from how Integer stored its value internally.
🐛 The problem
Every Integer operation — + , - , * , comparisons, even toString() — had to work with a String representation of the number. That means every single operation reparsed the digits from scratch before it could do any arithmet...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to