‹ BackHN Continuity

Thread

More floating point alternatives

53 points · 51 comments · vismit2000

  1. GoodDreams · · focus · HN ↗
    Consider representing money in cents ¢ instead of $, €, etc. Often it’s faster to parse a serialized integer then divide by 100 than to parse a decimal value. And sometimes it’s faster to serialize and sometimes you can serialize to fewer bytes. And often aggregation of integers is faster. And it may make supporting non-decimalized currencies, such as ¥, easier.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.