64-Bit vs 32-Bit (June 8)

Apple recently announced plans for High Sierra, the next OS update, due in Fall 2017. It will continue to run 32-bit Carbon applications like Goldenseal, but the phase-out of 32-bit support starts next year. 32-bit apps will still run under the subsequent, yet-unnamed Fall 2018 update, but it will complain about them.  Starting in 2019, 32-bit apps probably won’t launch at all.

Goldenseal Pro uses Cocoa, which is 64-bit. It will run fine on current and future Mac OS versions. It looks like we will finish it well before Fall 2018, so there will be at least a year of cushion.

The current Goldenseal is 32-bit. It runs fine on the current Mac OS (Sierra), and will be OK with the next two after that, and anything older. But it will have problems with new hardware starting in Fall 2019.

It took until August 2016 for Microsoft Office to switch from 32-bit to 64-bit. Over the next couple years, we will see how many other Mac programs (e.g. QuickBooks Desktop) can build 64-bit versions in time. Going from OS 9 to OS X killed off about 75% of Mac software companies, and moving from PPC to Intel zapped another 10%. My guess is that the carnage this time will be similar. Converting from Carbon to Cocoa is not easy.

If you are confused by the meaning of 32-bit vs 64-bit, here is some background. 32-bit integers can handle any whole number from 0 to 4 billion, while 64-bit integers go up to 16,000,000,000,000,000,000 (16 quintillion).

For accounting, 4 billion pennies is $40 million, which is probably good enough for residential construction. However, some unit costs need fractional cents, some amounts are negative, and some countries use currencies with values much smaller than $1 US. That means 32-bit numbers are too small for estimates and accounting.

If starting today, we would probably use 64-bit numbers for money amounts. Even with fractional pennies, it is big enough to handle the entire global GDP. However, when we started Goldenseal, 64-bit integers were poorly supported, and memory was much tighter. As a result, we developed a CMoney class that uses 32-bits for dollars, and 16-bits for pennies and fractions (48-bits total, or 6 bytes). It took a few programmer-months to get CMoney working. Now that the code is reliable, there is little reason to change it (and it does save about 5% on file size). Maybe if hyperinflation hits or we run out of things to do in the version 7.0 update, we’ll make the switch.

The biggest impact of 32-bit vs 64-bit is in file addressing.  A 32-bit OS maxes out with 4 gigabyte files, while a 64-bit OS can have huuuge files.

As part of our database overhaul last year, we already converted to 64-bit addressing in Goldenseal Pro. It adds approximately 20 bytes per record, which makes files about 10% bigger. The change doesn’t mean much for Goldenseal users, who rarely need more than 100 megabytes (.1 gigabyte). However, we use the same database code for an app that stores genome data, and it definitely will help there. The human genome is 3 billion base pairs, or 750 megabytes compressed. Start doing comparative genomics, and it’s easy to get files in the terabytes.

Kilobytes = 1 thousand bytes. Megabytes = 1 million.  Gigabyte = 1 billion. Terabyte = 1 trillion.

Dennis Kolva
Programming Director
TurtleSoft.com

 

Author: Dennis Kolva

Programming Director for Turtle Creek Software. Design & planning of accounting and estimating software.