Search | Synergex.com | Contact Us | Resource Center Login | Home|
News & Events

New in Synergy/DE 9.3! Binary Prototypes

Speed up compiles and reduce dependencies
By James Sahaj, Project Manager for Synergy .NET compiler

In version 9 of the Synergy compiler, we introduced the concept of prototyping. Prototyping enables a developer to check calls against definitions of routines or classes. We have heard from many of our users that this feature alone found many bugs they didn’t even know they had in their code, catching bugs at compile time that may never otherwise have been discovered.

Since that release, we’ve made this feature more flexible. The original v9 prototype files, with a .dbh extension, contain code that looks just like the source code, minus the implementation. Because these files are text based, the compiler needs to parse the files in order to import the prototypes, which can make an application with a lot of prototypes compile more slowly and cause the compiler to use more memory. In addition, the types used in those prototypes must be fully resolved, causing additional dependencies between prototype files. This forces a developer to import potentially far more namespaces than are being used in the application.

To address these issues, we designed a new binary format for the prototype file in Synergy/DE 9.3, released December 17, 2009. These binary prototypes have a file extension of .dbp. Unlike the previous prototype files, these binary files are not human-readable. Instead they are designed to load quickly and to support a new concept called demand loading. All definitions that appeared in the old prototype file, such as methods, classes, and structures, are declared in the binary prototype file in a format that can be directly loaded into the compiler’s symbol tables without needing to be parsed. This dramatically speeds up the loading of symbols from prototype files.

With demand loading, a type declaration, such as a class, is loaded from a prototype file only when that class is referenced in the code. So, while you may have an imported namespace with several hundred classes in it, if you use only one of the classes, only that referenced class gets loaded. This decreases load time because the compiler no longer loads all members of all classes in the imported namespace. In addition, dependencies in unreferenced imported classes no longer need to be fully resolved, reducing the number of dependencies to other classes in other namespaces.

In summary, for those of you prototyping your code, binary prototypes will speed up your compiles and reduce dependencies.

For more information about Synergy/DE 9.3, click here.

Customers with Developer Support can download Synergy/DE 9.3 from the Synergy/DE Resource Center. If you do not have Developer Support, contact your Synergy/DE account manager for more information.

Contact Synergex to learn more about  News and Events