The Artima Developer Community
Sponsored Link

Java Buzz Forum
Stack Allocated Objects Coming To a JVM Near You

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Weiqi Gao

Posts: 1808
Nickname: weiqigao
Registered: Jun, 2003

Weiqi Gao is a Java programmer.
Stack Allocated Objects Coming To a JVM Near You Posted: Oct 1, 2005 5:19 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Weiqi Gao.
Original Post: Stack Allocated Objects Coming To a JVM Near You
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
Latest Java Buzz Posts
Latest Java Buzz Posts by Weiqi Gao
Latest Posts From Weiqi Gao's Weblog

Advertisement

Brian Goetz: Escape analysis is an optimization that has been talked about for a long time, and it is finally here -- the current builds of Mustang (Java SE 6) can do escape analysis and convert heap allocation to stack allocation (or no allocation) where appropriate. The use of escape analysis to eliminate some allocations results in even faster average allocation times, reduced memory footprint, and fewer cache misses. Further, optimizing away some allocations reduces pressure on the garbage collector and allows collection to run less often.

Escape analysis can find opportunities for stack allocation even where it might not be practical to do so in the source code, even if the language provided the option, because whether a particular allocation gets optimized away is determined based on how the result of an object-returning method is actually used in a particular code path.

The lack of the ability to stack allocate objects has been a complaint against Java from C/C++ programmers for as long as I can remember. C#'s introduction of stack allocated structs forces developers to decide if a class of objects should be stack allocated or heap allocated at class design time, which some think is the wrong time.

Will the entire Java code base see a performance boost because of this optimization? I hope so!

Read: Stack Allocated Objects Coming To a JVM Near You

Topic: It's funny because it's true Previous Topic   Next Topic Topic: Links for 2005-09-19 [del.icio.us]

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use