Ian Reddy
Progress Report
During this week, I managed to benchmark some high performance libraries, using a standard benchmark. I used the MatMul bench mark from the j4p package. During this process, I managed to write a small library of my own to deal with only Matrix Multiplication, I used native interface with C, seemed to perform better than pure java implementations. Also found out that in lining assembly code further enhances the performance. This indicates usage of assembly powers performance. This means addition of instruction set will enhance performance. Well before introducing these instructions, I have to scan for complex patterns in bytecodes and manipulate. Writing a java program to achieve this may be a fairly complex job. Hence looked into the net for open source programs that may help. Got more than expected, in fact had to make a choice out of a few.
ASM
Bytecode manipulation framework
Designed and Implemented to be small and fast
Purely Implemented in Java
Runtime jar is only 25kb
Abstracts bytecode complexity from the User.
Implemented some sample programs successfully.
only needs the runtime jar in the class path
Complex (clearly my view)
BCEL
Bytecode Engineering Library.
Analyze, Create and Manipulate java class files.
Allows creation and modifications of class files from the scratch.
runtime jar size is 350kb.
Not thread safe .
Implemented some sample programs .
Huge API set.
Easy to Understand.
just needs the jar on the class path.
JavaAssist
Capable of creation, manipulation and editing class files during runtime.
Based on java vocabulary.
runtime jar size is 425kb.
Source code level and bytecode level API available.
Bytecode can be directly inserted as text, Java Assist will compile on the fly.
Implemented some sample programs.
Large API set.
Easy to Understand.
just needs the jar on the class path
Conclusion
Decided to go with the JavaAssist. It offers both Source and bytecode level API. The quality of introducing bytecode in pure text format, which would be compiled on the fly.
For the next week decided to use a standard class for test case and first recognize complex patterns at bytecode level.
Prof Lyon, need comments as to what class would be a good match for the test case class.