Here we present several complete examples of runtime code generation on these platforms. The purpose of this work is to investigate the suitability of these technologies that have recently entered the mainstream, and that can be expected to be widely available in the near future.
Further information about the examples, and results from experiments made with them, can be found here:
What is generated | C# version | Java version |
---|---|---|
A very simple method | RTCG1.cs | |
A method with integer argument and result | RTCG2.cs | RTCG2.java, RTCG2B.java |
Methods that contain loops, for timing | RTCG3.cs | RTCG3.java |
Specialized versions of the power function | RTCG4.cs | RTCG4.java, RTCG4B.java |
Specialized evaluator for polynomials | RTCG5.cs | |
Specialized evaluator for arithmetic expressions | RTCG6.cs | |
Large methods, for timing of code generation | RTCG7.cs | RTCG7.java, RTCG7B.java |
Specialized sparse matrix multiplication | RTCG8.cs | RTCG8.java |
Specialized AES encryption/decryption routines | AesFast.cs, AesGen.cs | |
Efficient delegate objects in Java | Delegate.java, TryDelegate3.java, TryDelegate4.java |