[ Guillaume Laforge ]


Home

CV

Projets

Weblog

Groovy 1.6-beta-1 release with great performance improvements  —  Ecrit par Guillaume

This is with great pleasure that G2One and the Groovy development team announce the first beta of Groovy 1.6.

Beyond the 73 bug fixes and 24 improvements listed in the release notes above, the main focus was on performance improvements.

Compilation and runtime performance improvements

As you may have already noticed with Groovy 1.5.5, the compiler is 3 to 5 times fasterthan in previous releases. This improvement is available both in this development version and in the 1.5.x stable branch. Thanks to class lookup caches, the bigger the project, the faster the compilation will be.

However, the most noticeable changes will be in the general runtime performance improvements of Groovy. We used several benchmarks from the Great Language Shootout to measure our progress. On those we selected, compared to the current Groovy 1.5.6 stable release, the performance improvements range from 150% to 460%. Micro-benchmarks obviously don't reflect the kind of code you have in your own projects, but the overal performance of your projects should improve significantly.

Beyond delivering stable and quality releases, our main focus over the past 10 months has clearly been on performance.
Between Groovy 1.0 and 1.5.1, on these same tests, we had already gained up to 80% speed improvements, and even between "dot releases" (1.5.1 and 1.5.6) we gained again up to 40% more. However, it's really in the development branch that we've integrated advanced call site caching techniques and bytecode diets in the runtime to get the 150-460% speed improvements mentioned above.

Important new features

Apart from performance related work, bug fixing and minor improvements, let me highlight two new key features which are under development.

Multiple assignments

First of all, I'll mention multiple assignments.

A code sample is always worth a thousand words:

def listOfN(numOfElem) \{ 1..numOfElem \}

def a, b

// variables will contain each successive element of the list
// and variables beyond the count of elements will be null
[a, b] = listOfN(1) // a list of one element
assert a == 1
assert b == null

// if there are more elements, they won't be assigned to any variable
[a, b] = listOfN(10) // a list of ten elements
assert a == 1
assert b == 2

// and you can swap variables with this notation

[a, b] = [b, a]
assert a == 2
assert b == 1

AST Transformations

The other key feature are the AST Transformations. It is more of an advanced feature that is useful for people knowing the internals of Groovy. But fortunately, some practical transformations can be of great interest for Swing developers, for instance.

When the Groovy compiler compiles Groovy scripts and classes, at some point in the process, the source code will end up being represented in memory in the form of a Concrete Syntax Tree, then transformed into an Abstract Syntax Tree. The purpose of AST Transformations is to let developers hook into the compilation process to be able to modify the AST before it is turned into bytecode that will be run by the JVM. Using annotations to decorate certain classes, fields or methods, a transformation can be applied to the AST of these elements.

A concrete example of the kind of transformations we can achieve with AST Transformations is the new @Bindable annotation. This is particularly useful if you are a Swing developer. See this example:

class MyBean {
    @Bindable String pro
}

When you decorate a field with @Bindable, property change listener methods will be transparently added to the bytecode of the class, so that you are able to monitor changes to the value of this field without having to manually write those methods yourself. No need to create an addPropertyListener() and removePropertyListener() method anymore, to fire property change events manually in your property setters, etc.

Danno Ferrin gives us an interesting overview of this annotation on his blog.

Other useful and interesting transformations and annotations will be coming in the future.

Annotation definition

Last but not least, as we mentioned annotations above, Groovy 1.5 was still lacking the ability to let us create annotations in Groovy -- they still had to be written in Java. Now it's possible to define annotations in Groovy itself with the usual Java syntax.

Noteworthy remarks

Groovy 1.6-beta-1 is built against JDK 5, but we will provide JDK 1.4 "retro-translated" versions of Groovy.
Note however that you may not necessarily experience the same performance improvements when running on JDK 1.4, as certain enhancements take advantage of JDK 5 (util.concurrent VM optimizations, for instance).
The bytecode generated by the Groovy compiler, as before, still targets the 1.4 JVM bytecode, except for annotations, enums and generics.

Useful links

You can download this new beta here:
http://groovy.codehaus.org/Download

And read the release notes from JIRA here:
http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&styleName=Html&version=14008

Conclusion

Thanks a lot to all those who have helped us making this release: users, contributors, committers, G2One employees.
This performant and innovative new version wouldn't be the same without all your hard work.
Special thanks to Paul King, Danno Ferrin, Alex Tkachman and Jochen "blackdrag" Theodorou for their commitment and quality work.

We're very interested in hearing about your feedback on this release.
Even if it's not the final 1.6 stable release and that you stick with 1.5.x in production, we would like to know how this beta performs in your respective projects, whether you notice any problem or regression. Please report anything you may find.

Enjoy!



posté le 03.05.2008 à 00:59:51 par Guillaume - Catégorie : Java

Liens

Commentaires

Christophe a écrit :

Congrats Guillaume for this new release.

Do you guys have plans in the near future to improve error reporting on the command line?
03.05.2008 17:35:42

rolex a écrit :

20.01.2010 17:03:35

rolex a écrit :

23.01.2010 20:03:11

replica watches a écrit :

24.01.2010 12:48:56

replica watches a écrit :

25.01.2010 20:40:18

replica watches a écrit :

27.01.2010 21:04:54

replica watches a écrit :

30.01.2010 00:21:16

replica watches a écrit :

The dial design a 100% copy http://www.watchvisa.com/ of the previous model: the famous Manchester Logo is http://www.watchvisa.com/ro... located at 3 and the chronograph 45-minute at 9 with orange figures. Football fans can use the very special 45-minute chronograph to measure the halves of a football match. Black hour replica watches hand and rolex watches minute hand breitling watches http://www.watchvisa.com/ca... features yellow luminescent cartier watches coating. http://www.watchvisa.com/om... The hour makers, chronograph and the first 15-minute http://www.watchvisa.com/br... scale of the chronograph counter is omega watches presented in eye-catching red. http://www.watchvisa.com/ta... Bright Yellow tones are found on the minute track, date window and the text tag heuer watches.<br/>
02.02.2010 13:14:25

replica watches a écrit :

03.02.2010 11:34:48

tag heuer watches a écrit :

Wearing Hamilton http://www.overwatches.com/ is not the replica watches privilege for the personnel of the railway company at that time. The inspectors of http://www.overwatches.com/... railroad, even rolex watches the company workers were its potential customers. As the development of the company, the Hamilton watch company is improving itself to being perfect. Till now, it has successfully become a top watch brand which is http://www.overwatches.com/... madly loved tag heuer watches across the world.At this point, Hamilton watch company, along with the tag heuer Watches other American cartier watch makers, decided to http://www.overwatches.com/... start producing breitling wristwatches. These were further used by the train engineers and in general, by the railroad personnel. In January 1957, this watch manufacturer http://www.overwatches.com/... launched the omega watches world's first electric wristwatch. As it was a premiere, this shocked the industry quite a bit. The battery was said to offer a power http://www.overwatches.com/... reserve of one men's watches year. In these conditions, the mainspring became useless.Hamilton Watch Company represented one of the solutions. By supplying railroad companies with amazingly accurate timepieces, the http://www.overwatches.com/... Hamilton women's watch helped to save countless lives. What also helped was the adoption of a standard time plan. The four time zones, namely Eastern, Central, Mountain and Pacific were set up. The Hamilton timepieces also played an important role in http://www.overwatches.com/... railroad safety at that ladies time. As a proof of this stands the fact that the Hamilton watch was called "The Watch of Railroad Accuracy. The book published by the Hamilton Company recorded all its historical issues. Detailed description about the models and relative data of Hamilton watches are marked inside. For those who are about to buy a Hamilton watch, this book is really worthy of reading. It can certainly help you to make the right choice.
04.02.2010 09:35:01

tag heuer watches a écrit :

Roger Dubuis http://www.watchvisa.com/ro... is rolex watches a watch brand http://www.watchvisa.com/ta... which owns tag heuer watches many fans all over the world for the past years. That is because it is a watch brand with a reputation for creating seductive and innovative timepieces. By applying the most advanced technology, http://www.watchvisa.com/br... Roger Dubuis has breitling watches proven itself to be one of the most reliable brands in the watch making industry. This watch brand is a successful one by creating http://www.watchvisa.com/om... great timepieces omega watches.Roger Dubois has as a declared philosophy the intention to create highly individual timepieces, stating that Roger Dubuis represents a unique identity code. So far, Roger Dubuis has http://www.watchvisa.com/ca... managed to cartier watches fulfill all the requirements of a society interested in acquiring unique timepieces and its creations reflect passion for good taste, seductive design and high-end technical know how.Discover the power of curves with the new Roger Dubuis Excalibur Mens watch, with its interesting almost hexagonal case made of stainless Replica watches steel. Even though it replica approaches a sportier http://www.watchvisa.com/ appearance replica watches, the quality of the materials used is indisputable and the over all design of this timepiece is impressive. The case measures 43 mm in diameter, being quite masculine and it is covered with scratch resistant sapphire crystal. Also, surrounding the case we can see a unidirectional bezel made of white golf that's inscribed with Arabic numerals from 10 to 60, meant to help at diving.Belonging to the Easy Driver series, this watch was designed especially for the active men who are not afraid of exploring the depths of the oceans, as the new Roger Dubuis Excalibur Mens watch provides a water resistance of 1000 meters. Its automatic movement is quite impressive and it's defined by the designers from Roger Dubuis as the RD 14 Clibre.
04.02.2010 14:26:27

replica watches a écrit :

04.02.2010 21:29:03

Rolex replica a écrit :

<a href="http://www.dearwatches.com/... watches</a>
<a href="http://www.dearwatches.com/... Heuer watches</a>
<a href="http://www.dearwatches.com/... watches</a>
<a href="http://www.dearwatches.com/... watches</a>
<a href="http://www.dearwatches.com/... Constantin watches</a>
<a href="http://www.dearwatches.com/... Accessories</a>
06.02.2010 03:19:00

replica watches a écrit :

06.02.2010 22:34:40

Ajouter un commentaire

:

:
:


Références externes

Cette page a été vue 6695 fois.
Dernier visiteur le 2010-02-09 23:02:37.