Issue Details (XML | Word | Printable)

Key: JANINO-121
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Arno Unkrig
Reporter: Matt Fowles
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Janino

Some performance optimizations

Created: 17/Jun/08 01:13 PM   Updated: 18/Jun/08 04:18 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.5.15

Time Tracking:
Not Specified

File Attachments: 1. Text File janino-optimize.patch (103 kB)


Testcase included: yes
Patch Submitted: Yes


 Description  « Hide
This includes a bunch of optimzations. None of these optimizations were made blindly, they were all directly indicated by profiling.
  • Descriptor should use a map to cache common conversions
  • CodeContext should avoid allocating unneeded objects
  • CodeContext should double code size when growing it
  • Methods should be cached by name
  • switch finding LocalVariables to push the information down the tree eagerly instead of searching up it lazily
  • add the ability for SimpleCompiler to cook ASTs directly
  • UnitCompiler should push a local variable map through the tree
  • add more tests


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Arno Unkrig added a comment - 18/Jun/08 04:01 PM
  • Descriptor should use a map to cache common conversions
    v. good.
  • CodeContext should avoid allocating unneeded objects
  • CodeContext should double code size when growing it
    v. good.
  • Methods should be cached by name
    v. good.
  • switch finding LocalVariables to push the information down the tree eagerly instead of searching up it lazily
    v. good.
  • add the ability for SimpleCompiler to cook ASTs directly
    v. good.
  • UnitCompiler should push a local variable map through the tree
    v. good.
  • add more tests
    Modified "testByteArrayLiteral()" due to JANINO-117.

Please avoid the declaration of unnecessary exceptions!
Please try to obey the "Java Coding Conventions" regarding spaces before and after operators.


Matt Fowles added a comment - 18/Jun/08 04:11 PM
sorry about that. I try to copy the surrounding style whenever I can, but sometime I forget.