Optimizing Marshalling by Run-Time Program Generation
- 620 Downloads
Saving the internal data of an application in an external form is called marshalling. A generic marshaller is difficult to optimize because the format of the data that will be marshalled is unknown at the time the marshaller is implemented. On the other hand, efficient marshallers can be written for specific kinds of data. In this paper we use run-time program generation (RTPG) to produce specialized marshallers. We use Jumbo, a Java compiler supporting programmer-specified RTPG. We show that RTPG is easily employable. Speedups in order of magnitude can be achieved in some cases. We study the case where the data consist of a large number of objects of a single class and the case where there are objects of many classes. In the latter case, “just-in-time” heuristics allow us to limit RTPG costs and gain considerable speedups.
KeywordsCrossover Point Class Descriptor Code Object Native Code Program Fragment
Unable to display preview. Download preview PDF.
- 3.Clausen, L.: Optimization. In: Distributed Run-time Compilation. PhD thesis, University of Illinois at Urbana-Champaign (2004)Google Scholar
- 8.Veldema, R., Philippsen, M.: Compiler Optimized Remote Method Invocation. In: IEEE International Conference on Cluster Computing, CLUSTER 2003, p. 127 (2003)Google Scholar
- 10.Kaffe, J.V.M.: http://www.kaffe.org
- 11.Java Object Serialization Specification, http://java.sun.com/j2se/1.4.2/docs/guide/serialization/spec/serialTOC.html
- 13.Java 1.4.2 API Documentation, http://java.sun.com/j2se/1.4.2/docs/api/
- 15.Advanced Programming for the Java 2 Platform: Ch. 8; Performance Features, http://java.sun.com/developer/onlineTraining/Programming/JDCBook/perf2Tools.html
- 16.Oiwa, Y., Masuhara, H., Yonezawa, A.: DynJava: Type Safe Dynamic Code Generation in Java. In: The 3rd JSSST Workshop on Programming and Programming Languages (2001)Google Scholar