Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Groovy
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h1>Background</h1> <p>Groovy has a performance problem, compared with Java, due to its dynamic nature, while there are several requests for performance improvement.</p> <h1>Proposed Solution</h1> <p>Implementing just-in-time compiler is a proper way to help boosting performance of Groovy. It would be great to have a Groovy module (in this case a JVMTI agent) to help transform/redefine Groovy classes during runtime.</p> <h2>Primitive Operations</h2> <p>As of Groovy 1.6-beta series, its performance has been improved but there are still problems occurred from primitive operations. All operand and results are heavily boxed and unboxed when primitive variables are used. The current implementation of GJIT provides the algorithm to unwrap almost binary operations back to be primitive. Thus, it can speed Groovy performance up when dealing with arithmetic calculation. </p> <h2>Implementation</h2> <p>This is the completely re-written version of GJIT. Basically, GJIT can be thought as a Hotspot-like compiler for Groovy. However it is working outside JVM, and not a part of the virtual machine. GJIT uses JVMTI, the virtual machine tool interface, to:</p> <ol> <li>Transform a class when it is being loaded, based on the assumption that the default metaclass provides the default behaviour.</li> <li>Redefine the class with the original one, when the metaclass of this class is modified.</li> </ol> <p>Due to the use of JVMTI, GJIT supports Java 5 or later.</p> <h1>Usage</h1> <p>Add</p> <table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> -javaagent:gjit.jar </pre></td></tr></table> <p>to your Java command line to use GJIT.</p> <h1>Missing Features and Known Bugs</h1> <ul> <li>Primitive casts have not been processed properly.</li> <li>Class redefinition is not built in yet, it needs to tweak MetaClassImpl.</li> </ul>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced