Pacific Connection(英語)
ISVs Applaud the Mac’s Move to Intel
2005年10月18日
Steve Jobs made it official in his keynote address at Apple's Worldwide Developers Conference: the Mac would drop the PowerPC in favor of Intel. Independent software vendors generally welcomed the news. Many ISVs have see it as a move to the mainstream CPU, with higher-performance on laptops. Others simply said that if Steve thought it was a good idea, that was all they needed to know. Jobs himself called it the third "transformation" for Mac. The first was the switch from the CISC Motorola 68000 to RISC PowerPC in the mid-1990s. The second was the move from Apple’
Putting “Intel Inside” the Mac puts Apple even further in the mainstream. RISC processors, once the darling of workstation manufacturers, are disappearing. But the move further blurs the line between Macs and PCs. It has long been difficult to see a clear advantage of the Mac OS interface over Windows. Now, Macintosh computers will essentially be PCs under the hood-so much so that some observers are confident that the Intel Mac will run Windows in native mode. (At this writing, there is already at least one report of an Apple Developer kit version of Mac OS X x86 “hacked” to run on a PC notebook.) What Apple will continue to have going for it is the reputation for reliable systems that are easy-to-use, with strong customer service. And there’
So why move to Intel? "I stood in front of you two years ago, and I promised you this," Jobs said, referring to a 3 GHz machine. "And we haven’
Apple is planning a two-year transition, with the Intel-based Mac shipping next year. Some observers wonder whether the announcement will depress sales for PowerPC-based Macintoshes in the mean time. Clearly that's a risk, but the long-term gain seems worth it. Presumably, Apple as a company can coast on its other, even more popular product family: the iPod.
Jobs also confirmed rumors that Apple engineers have compiled every release of Mac OS X on Intel processors, in addition to the PowerPC. "Mac OS X has been living a secret double life for the past five years," he said. "We've had teams doing a 'just-in-case' scenario. Our rules have been that our designs for OS X must be processor-independent,” with separate builds for the PowerPC and Intel . To make his point, he revealed that the demo system he had been using on the stage was itself Intel-powered. With a native Intel version of Mac OS already in place, Apple’
As for Carbon applications created in Metrowerks CodeWarrier--once the leading Macintosh development environment--"the first thing you have to do is move to Xcode," Jobs said, pointing out that the company started evangelizing Xcode 18 months ago.” There is no longer any choice: CodeWarrior, now owned by Motorola spin-off Freescale Semiconductor, is in its final version. Jobs said that less than 20 percent of Apple developers have yet to switch. To encourage them at the conference, Apple handed out CDs containing the latest version of Xcode--version 2.
Well, it’
To make the case that the port can be easy, Jobs introduced Theodore Gray, co-founder of Wolfram Research, whose chief Macintosh developer, Rob Raguet-Schofield, needed just two hours to port the company's popular Mathematica program. Gray told the audience that Mathematica code contains “probably the world's largest collection of algorithms. It supports all kinds of programming styles and data formats. It's built with millions of lines of code. We've got C code and Java code, we've got the most modern C++ widget things along with code that probably hasn't been changed since the Reagan administration--some of it written by me. This not a toy app--this is a beast. But Steve said 'don't worry'--just check this little checkbox, and it'll be great.
“So I sent out our crack team of emergency programmers that we keep on standby,” Gray said-pointing to Rob. “We put him on a plane. I couldn’
Mathematica is now ready for Intel-based Macs. What about other ISVs? Here are what others had to say:
Luxology: Porting over lunch
Matt Craig, senior software engineer for Luxology, didn't waste much time doing converting his company’
Craig, who shared the lab with about 10 other programmer that day, had to change just one line of code governing byte swapping: PowerPC chips are “big-endian”
"This is a great thing--for us and for Apple," Craig said. "What Jobs is saying is true regarding power per watt: my PowerBook doesn't get nearly the battery life of my co-workers' Pentium machines.” As for the G5s, which are liquid-cooled, Craig thought that they were about as practical as having a liquid-cooled phone. Craig said that the sheer size of Intel gives developers a sense of stability. "Intel is not going away, and it's nice to know that there's some security writing code for the world's dominant chipmaker for PCs.” He said the real chore for developers will not be the port, but maintaining quality control on the two Mac platforms.
The modo application is processor-intensive, but Luxology has shied away from writing chip-specific vector processing code, because of the burden of supporting different versions on the G4 and G5, and a version without the code for the G3. That may change with the shift to Intel. With a Linux version of modo planned, "we can consider running on three different operating systems, with the exact same vector processing code across the board,” Craig said. That's the hope, at least. "I'm a Mac guy. So I'm just learning about this stuff."
Having a common CPU will also make comparison "shootouts" between PCs and Macs more realistic, he said, because any differences in performance can be traced to software, not hardware. “If your stuff is slower, it's your fault, and you can't blame the chip. There's nowhere to hide--and that includes us, of course. If modo runs faster on one machine than another, it will be up to us to find out why.”
Craig said he has also been impressed with the performance of Apple’
StataCorp: upping performance for 64-bit floating point
"It's a good move for Apple--we've wished for some time that the Apple operating system could run on other hardware," said Alan Riley, vice president of software development at StataCorp LP, which makes the statistical package Stata for researchers. Stata 9 runs on the Mac, Windows, and Unix flavors, including Linux. "Apple made an aborted attempt on Intel a few years ago, but they gave up on it. With the UNIX kernel underlying Mac OS X, they are now in a much better position to do the port."
Riley said that the Intel chip has delivered faster performance under Windows and Linux for the company's statistical software. "Comparison benchmarks on the Mac often use PhotoShop," he said. "I don't know what goes on under the hood with the PhotoShop code, but I imagine it would have to manipulate a lot of 32-bit integer values. But for scientific applications like ours, 64-bit floating point computation is more important, and Apple's AltiVec vector processing only handles 32-bit." Riley said the SSE (Streaming SIMD (single instruction, multiple data) Extensions) technology in Intel chips doesn't quite match up to AltiVec's potential performance for 32-bit values. But for scientific applications using 64-bit floating-point values, Intel's approach--dual-core chips with strong multi-threading capabilities--can make up the difference.
Riley said that another limitation of the PowerPC chips is their inability to natively handle unaligned memory access, such as a 32-bit integer offset by two bytes in memory. StataCorp developers run into this situation when trying to conserve memory space while processing large amounts of data. "While the Intel x86 family deals with unaligned memory very quickly, PowerPCs raise a misalignment exception which must be dealt with in software, slowing down memory accesses."
At this writing, StataCorp is in a "holding pattern" in making the transition. "Apple is slowly making available the hardware and the software beta kit,” Riley said. “We don't anticipate it will be difficult, as we already support Windows and Linux on the Intel side. The biggest challenge for us will be in switching compilers: from Metrowerks CodeWarrior to Apple."
Bare Bones: Just one more curve on the Apple road
One of the first companies with an actual shipping Intel Mac product was Bare Bones, which released a new version of its BBEdit HTML and text editor as a universal binary for the transition kit hardware. Founder and CEO Rich Siegel said the demand came from developers both inside and outside Apple.
Bare Bones is an established Macintosh ISV that has long followed Apple’
"The transition for us was straightforward because we've put a great deal of effort into best practices disciplines--like making sure our code was building without compiler warnings. And we converted to Xcode years ago. If you are writing Mac software in particular, Apple has long had a list of coding and API usage guidelines. And if you follow the guidelines, you are going to be good shape for whatever transitions are going to transpire on the platform."
CodeWeavers: Linux developer eyes Mac customers
Jeremy White, founder and CEO of CodeWeavers, sees the Apple announcement as a business opportunity. CodeWeavers' software allows some Windows programs to run on Linux by intercepting calls to the OS. White would now like to do something similar on the Mac. CodeWeavers claims to be the largest corporate sponsor of Wine and that open source technology is the foundation for its products. The company provides business services for Wine the way Red Hat and Novell do for Linux.
"We heard the rumors about a week or two before Apple announced," White recalls. "And I sat in this very room and told people it was nonsense and it couldn’
The main programming challenges, he said, will be to accommodate the Mac OS Xs BSD core and the differences between the Mac and Windows interfaces. "For example, Macintosh applications puts their menus at the top of the main screen, while Windows menus are contained within the application's own window. That’
White also realized that the demands for Windows applications are different on the Linux and Macintosh boxes. "In the Linux market there is no Microsoft Office, so we focus on a very small number of very key applications, like Office and Intuit's Quicken. So it may be that the Mac market will require a different sort of applications and approach. Today, maybe 20 to 25 percent of applications will run well with our product. Our hope is that by the time we launch the product that our technology will have matured and that number is closer to 50 percent."
There's one other difference-one that might gladden the hearts of Linux application developers everywhere: Mac people are used to paying for software. "These people have money. And God knows, we need money."
Sidebar: A conversation with Theodore Gray
In 1987, Theo Gray dropped out of the PhD program in theoretical chemistry at the University of California, Berkeley--and began writing what would become the user interface for Mathematica. Gray joined Stephen Wolfram and four others in co-founding Wolfram research the following year. He has written four books on the program and has appeared on stage with Steve Jobs at three Apple conferences. His personal home page is at theodoregray.
- Is there any downside on Apple’
s move to the Intel platform? - I’ve always been a die-hard Mac fan and very protective of the Macintosh legacy, But the particular processor technology Apple uses has never been important to what it means to be a Macintosh. When Apple made the transition from 68K to the PowerPC-they just went with a faster processor. The same is true in switching to Intel.
- What are the advantages?
- I’ve used laptops since the PowerBook Duo 280--I have not used a desktop since then. And I’
ve been feeling progressively more pinched over the last couple of years because there’ s no such thing as a G5 laptop. Macintoshes are fast, but other laptops are 10 times faster than mine. That’ s not enough to get me to use a Windows machine, but it’ s getting a bit irritating. That’ s where the message from Apple and Intel rings true: it's not so much megahertz or gigahertz clock speed--it’ s power consumption. Someday I’ m going to get an Intel Macintosh laptop that’ s as fast as these Windows laptops. At least I hope so. - I don’
t know if there’ s as much of an advantage for G5 desktops and Xserves--they are pretty fast, cost effective machines. I’ m not familiar enough with the processor technology to say if Intel is going to make a huge difference in the non-laptop world. - How many Mathematica customers use Mac versus Windows and Linux?
- Windows is certainly the largest, but I haven’
t looked at the exact breakdown recently. For a long time, it was roughly equal in thirds between Windows, Unix and Macs. And if you count Windows and Linux together as comprising the Intel platform, that's definitely the largest portion. - Are new versions of Mathematica developed first on Windows?
- We develop on all platforms simultaneously. We have developers who work on Unix, on Windows, on Macintosh and everything builds every night on all platforms. I think that’
s pretty much how everybody does it these days. It’ s the only way to make a big complicated system like ours run well on different platforms. If you have development on one system and then port it to another, the port is always going to be a second-class citizen. That’ s what Apple has been doing. The fact that they were developing on Intel at the same time was a deep, dark secret, even within Apple, but that’ s what they were doing. - What about the transition for developers who are only on the Mac?
- Mostly, they’
re not going to get it done in two hours because they’ ll have to deal with processor-specific issues--although that depends a lot on the kind of application. For example, if you deal a lot with raw binary data formats and you have to deal with byte order issues, which are reversed between the two processors-that’ s potentially a significant amount of work. - So given that you are already on the Intel platform, what kind of porting work did you have to do?
- Virtually none. We have little flags in our code that say if the byte order is big-endian or little-endian. We have hundreds of lines of code that use that flag.
- What about the Apple interface--is it the same?
- Yes, it’
s identical. Steve made that clear in his demo. He had demonstrated all this software-different dashboard widgets, new features in OS X-and that whole time he had been using the Intel version. You really couldn't tell. - Mathematica has more number-crunching requirements than the typical application. Does Intel do it better?
- The PowerPC has its AltiVec vector processing technology, while Intel has it’
s own vector technology. There is general agreement that AltiVec is better, while on the other hand, Intel's clock speeds are higher. So which will deliver better performance depends on the kind of problem you are working on. - What compilers will you be using use?
- For Mac Intel we’
ll use GCC. For Windows, we use Microsoft's C++ compiler. - So how did you wind up as the featured developer in Steve Jobs' demo?
- This was the biggest secret Apple has had in years. Normally they would tell us ahead of time under non-disclosure, as with the G5 introduction--but none of Steve's underlings would. So when Steve himself called about 9PM one evening, said I wouldn’
t get on the plane until he told me what he was after. I couldn't actually go with a straight face to Steve Wolfram and tell him I’ m going to fly to California without knowing. But I didn’ t tell Rob Raguet-Schofield, our main Macintosh developer--he didn’ t find out until he got to Apple. I was expecting that we would have to lock him up in a room all weekend. But when I got off the plane the next day, he was all done--it had taken him just two hours. There was nothing for me to do, other than work out the text of what I was going to say. - Why did they pick Wolfram?
- We’
ve done this a couple of times before-an emergency port. And we’ re a good example of an application that has name recognition as a big, complicated beast of a program. It’ s not some little toy. And we’ re easy to work with.
バックナンバー
Pacific Connection(英語)
- Charting the New World of Neogeography
- Threaded Building Blocks: Intel's James Reinders on writing parallel code for C++
- Sipping Cappuccino at 280 North
- Functional Programming on the Cusp of Commercial Success
- On Fedora’s Fifth, Project Manager Paul Frields Looks Upstream
- Embedded Computing for the Rest of us: Project Sun SPOT
- Cloud Computing Vendors Reaching Out to Developers
- OpenStreetMap: The Map that Anyone Can Edit
- Magnatune: “Open Source” Music Turns a Profit
- Keeping it Loose at LugRadio Live USA