Early in the porting process, identify the workflow you’ll use to build and test your code. Xcode runs on all Mac computers, so build your code on either an Apple silicon or Intel-based Mac computer and do your initial testing there. However, always test, tune, and validate your code on both computer types to uncover issues specific to that architecture.
In addition to a workflow plan, identify potential areas to investigate during the porting process. The porting effort for arm64
depends on how much you rely on hardware-specific features. If you rely mostly on Apple frameworks and technologies, your porting effort may be small. If you tuned your code specifically for the x86_64
architecture and hardware capabilities, porting to arm64
may require additional effort.
To start your investigation, make a note of any code that does the following:
-
Interacts with third-party libraries you don’t own.
-
Interacts with the kernel or hardware.
-
Relies on specific GPU behaviors.
-
Contains assembly instructions.
-
Manages threads or optimizes your app’s multithreaded behavior.
-
Contains hardware-specific assumptions or performance optimizations.
The list above is not exhaustive, but it offers a starting point for your investigation. Hardware and architectural differences may introduce bugs or performance issues to your code on Apple silicon. Identifying potential problem areas early will save you time later.
Always have a well-defined test plan, ideally with a set of automated test suites you can run at build time. In addition to testing your code’s correctness, gather metrics on your app’s performance. Examine your app’s memory usage, and measure how long it takes to execute specific tasks on both Apple silicon and Intel-based Mac computers. Use that information to identify additional areas to investigate.