Optimizing Marshalling by Run-Time Program Generation

  • Barış Aktemur
  • Joel Jones
  • Samuel Kamin
  • Lars Clausen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3676)


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.


Crossover Point Class Descriptor Code Object Native Code Program Fragment 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Nester, C., Philippsen, M., Haumacher, B.: A more efficient RMI for Java. In: Proc. of the ACM 1999 Java Grande, pp. 152–159. ACM Press, New York (1999)CrossRefGoogle Scholar
  2. 2.
    Kamin, S., Clausen, L., Jarvis, A.: Jumbo: Run-time Code Generation for Java and its Applications. In: Proc. of the Intl. Symposium on Code Generation and Optimization (CGO 2003), pp. 48–56. IEEE Computer Society, Los Alamitos (2003)CrossRefGoogle Scholar
  3. 3.
    Clausen, L.: Optimization. In: Distributed Run-time Compilation. PhD thesis, University of Illinois at Urbana-Champaign (2004)Google Scholar
  4. 4.
    Kamin, S., Callahan, M., Clausen, L.: Lightweight and Generative Components-2: Binary-Level Components. In: Taha, W. (ed.) SAIG 2000. LNCS, vol. 1924, pp. 28–50. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  5. 5.
    Kamin, S.: Routine Run-time Code Generation. In: Companion of the 18th ACM SIGPLAN Conf. on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2003), pp. 208–220. ACM Press, New York (2003)CrossRefGoogle Scholar
  6. 6.
    Kamin, S.: Program Generation Considered Easy. In: Proc. of the 2004 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation (PEPM 2004), pp. 68–79. ACM Press, New York (2004)CrossRefGoogle Scholar
  7. 7.
    Maassen, J., van Nieuwpoort, R., Veldema, R., Bal, H.E., Kielmann, T., Jacobs, C., Hofman, R.: Efficient Java RMI for Parallel Programming. ACM Trans. Program. Lang. Syst. 23, 747–775 (2001)CrossRefGoogle Scholar
  8. 8.
    Veldema, R., Philippsen, M.: Compiler Optimized Remote Method Invocation. In: IEEE International Conference on Cluster Computing, CLUSTER 2003, p. 127 (2003)Google Scholar
  9. 9.
    van Nieuwpoort, R.V., Maassen, J., Wrzesinska, G., Hofman, R.F.H., Jacobs, C.J.H., Kielmann, T., Bal, H.E.: Ibis: A Flexible and Efficient Java-based Grid Programming Environment. Concurrency and Computation: Practice and Experience 17, 1079–1107 (2005)CrossRefGoogle Scholar
  10. 10.
    Kaffe, J.V.M.:
  11. 11.
  12. 12.
    Taha, W., Sheard, T.: MetaML and Multi-stage Programming with Explicit Annotations. Theoretical Computer Science 248, 211–242 (2000)zbMATHCrossRefGoogle Scholar
  13. 13.
    Java 1.4.2 API Documentation,
  14. 14.
  15. 15.
    Advanced Programming for the Java 2 Platform: Ch. 8; Performance Features,
  16. 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
  17. 17.
    Neverov, G., Roe, P.: Metaphor: A Multi-stage, Object-Oriented Programming Language. In: Karsai, G., Visser, E. (eds.) GPCE 2004. LNCS, vol. 3286, pp. 168–185. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  18. 18.
    Consel, C., Lawall, J.L., Meur, A.F.L.: A Tour of Tempo: A Program Specializer for the C Language. Sci. Comput. Program. 52, 341–370 (2004)zbMATHCrossRefGoogle Scholar
  19. 19.
    Kamin, S., Aktemur, T.B., Morton, P.: Source-level optimization of run-timeprogram generators. In: Glück, R., Lowry, M. (eds.) GPCE 2005. LNCS, vol. 3676, pp. 293–308. Springer, Heidelberg (2005)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Barış Aktemur
    • 1
  • Joel Jones
    • 2
  • Samuel Kamin
    • 1
  • Lars Clausen
    • 3
  1. 1.University of Illinois at Urbana-ChampaignUSA
  2. 2.University of AlabamaUSA
  3. 3.State’s LibraryAarhusDenmark

Personalised recommendations