BrainVoyager QX on Intel Core Duo iMac
Today I got a new computer - an Apple iMac. What is so special about this machine? It is the first computer from Apple, which runs on an Intel chip. The announcement last summer that Apple would switch from IBM’s PowerPC chips to Intel CPUs created a lot of discussion and it came as a surprise that only half a year later the availability of the first Intel-based Apple computers were announced by Steve Jobs during his Macworld keynote in January. I had already experience with an Intel-based Mac, which was made available to developers shortly after the announcement of the switch last summer. This machine, however, was transitional and has been replaced now by Apple with a 17 inch Intel-based iMac.
For the development of BrainVoyager on the Mac, Apple’s transition to Intel hardware has several advantages. The most important point concerns the different byte order or “Endianness” used in the two processors. Endianness refers to the order in which successive bytes are stored in computer memory. BrainVoyager QX saves all its binary file formats in “Little Endian” mode, which is the order used in Intel machines. The IBM PowerPC CPU uses the opposite byte order, “Big Endian”. While BrainVoyager handles different byte orders transparently to the user, loading and saving files is slower on PowerPC processors because of the extra “byte swapping” step required on these machines.
Another advantage coming for free to the Mac platform is that BrainVoyager uses optimized routines from Intel (the ”Math Kernel Library”, MKL) in order to perform some routines with maximum speed, for example, matrix multiplications and matrix inversions. These fast routines exploit special “MMX” and “SSE” instructions and are used until now only on Windows. With the switch to the Intel platform, these fast routines will also be available for BrainVoyager QX on the Mac as announced by Intel. For the G4 and G5 Macs, Apple has actually a similar acceleration instruction set called “AltiVec” or “Velocity Engine”. I actually planned to do some extra AltiVec coding to speed up BrainVoyager on the Mac, but when I heard last summer that Apple moves to the Intel platform, I immediately stopped these plans.
I could not resist to immediately compile BrainVoyager QX on the new Intel iMac in order to test its overall performance. My first impressions are very positive with a “felt” performance comparable to Intel machines with a 2 GHz Pentium M or a 3 GHz Pentium 4 processor. Since the iMac uses a dual core chip, much higher performance will be achieved when I have parallelized all computation intensive routines of BrainVoyager QX (scheduled for version 1.9). I have now two Mac binaries of BV QX, one for PowerPC and one for Intel (see snapshot above). I plan to release BrainVoyager QX 1.7, however, as a “universal binary” as recommended by Apple, which means that there will be one application containing executables for both platforms.