The average user will use only a small fraction of the features at any given time. These features typically produce multi-megabyte files. For example, consider a full-featured word processor with such features as a thesaurus, a spell checker, mail merge, and export. In contrast, the Java Loader can selectively load classes in a properly designed program as they are needed. Establishing an automatic method for doing this in Win32 will require extensive programming on the part of the developer. Finally, if the program is on a remote drive, the DLL must still be brought onto the local machine before it can be used. This means that there is no way to tell if a DLL has changed except via a program crash. In addition, there is no run-time type checking for dynamically linked DLLs. Dynamically linked DLLs are loaded upon request but are rarely used because the syntax for loading the DLLs and accessing the contained library functions requires a large programming effort in Win32. Statically linked DLLs (by far the most common) are loaded before the program is executed. There are two ways to link DLLs in Win32: statically and dynamically. Selective loadingĬ++ program loaders must generally load the entire executable file before execution begins. The inclusion of these libraries can double or even treble the size of delivered code. Unfortunately, if a developer wants to use any special functions outside the core C++ API, he must deliver the implementation of the supporting libraries with his program. In contrast, C++ defines application programming interfaces (APIs) that allow developers to access many of these functions in a consistent manner. The Java virtual machines (JVMs) contain these libraries. Second, Java provides a series of well-defined consistent libraries, such as mathematics, various network services, collection classes, and graphics classes. There are three contributing factors that account for this size difference.įirst, the binary executable format for C++ programs can inflate code by as much as a factor of two over Java code. Windows NT executables that are written in C++ are significantly larger than similar Java executables. There are two main contributors to this size difference: executable size and selective loading. Over the Internet or intranet, Java programs and resources are, in general, much smaller and faster to load than native applications. If, however, the program is located on a Web site on the Internet or a corporate intranet, executable size may become the limiting factor in the performance of a program. ![]() If the program is located on a disk drive local to the target platform, loading time of larger programs is rarely of concern. Performance implications: Java versus native C++ (LPE) The first step in running a program is to load the executable files into memory. ![]() These executable files can be run on the target machine. A compiler/linker translates these source files into executable files. ![]() Of 2 Loading Program Executable (LPE)ĭevelopers create new programs by writing code into one or more source files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |