Deciding whether to generate native code
Generating native code is more work than bytecode but enables faster execution. Native code may also use less memory or electricity. Native code pays for itself if end users save time or money. However, targeting a specific central processing unit (CPU) sacrifices portability. You may want to implement bytecode first, and only generate native code if the language becomes popular enough to justify the effort. However, there are other reasons to generate native code. You may be able to write your runtime system using the facilities provided for another compiler. For example, our Jzero x64 runtime system is built using the GNU’s Not Unix (GNU) C library. Now, let’s look at some of the specifics of the x64 architecture.