Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Thursday October 27 2022, @03:55PM   Printer-friendly

Condensers promise to accelerate Java programs:

Project Leyden, an ambitious effort to improve startup time, performance, and footprint of Java programs, is set to offer condensers. A condenser is code that runs between compile time and run time and transforms the original program into a new, faster, and potentially smaller program.

In an online paper published October 13, Mark Reinhold, chief architect of the Java platform group at Oracle, said a program's startup and warmup times and footprint could be improved by temporarily shifting some of its computation to a point either later in run time or backward to a point earlier than run time. Performance could further be boosted by constraining some computation related to Java's dynamic features, such as class loading, class redefinition, and reflection, thus enabling better code analysis and even more optimization.

Project Leyden will implement these shifting, constraining, and optimizating transformations as condensers, Reinhold said. Also, new language features will be investigated to allow developers to shift computation themselves, enabling further condensation. However, the Java Platform Specification will need to evolve to support these transformations. The JDK's tools and formats for code artifacts such as JAR files will also need to be extended to support condensers.

The condensation model offers developers greater flexibility, Reinhold said. Developers can choose which condensers to apply and in so doing choose whether and how to accept constraints that limit Java's natural dynamism. The condensation model also gives Java implementations considerable freedom. As long as a condenser preserves program meaning and does not impose constraints except those accepted by the developer, an implementation will have wide latitude for optimizing the result.


Original Submission

This discussion was created by janrinok (52) for logged-in users only, but now has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 4, Touché) by BananaPhone on Thursday October 27 2022, @04:12PM (4 children)

    by BananaPhone (2488) on Thursday October 27 2022, @04:12PM (#1278774)

    Most places I know are moving away from Java.

    • (Score: 3, Interesting) by Thexalon on Thursday October 27 2022, @05:38PM

      by Thexalon (636) Subscriber Badge on Thursday October 27 2022, @05:38PM (#1278795)

      By contrast, a project I've often had on my horizons for my "copious" free time: A JS pruner, so that instead of downloading 2-5 Mb of JS code per page load, at compile-time NodeJS or whomever would figure out what actually might get executed on the site and leave out everything that wouldn't. You might have to tell it some things about your AJAX calls, but it would seem like that could be well worth the effort.

      --
      The only thing that stops a bad guy with a compiler is a good guy with a compiler.
    • (Score: 2) by JoeMerchant on Thursday October 27 2022, @05:44PM

      by JoeMerchant (3937) on Thursday October 27 2022, @05:44PM (#1278797)

      I can't really get any farther from Java than I already am... it has been a pariah in my eyes for 25 years now.

      --
      Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
    • (Score: 3, Interesting) by riT-k0MA on Thursday October 27 2022, @07:21PM (1 child)

      by riT-k0MA (88) on Thursday October 27 2022, @07:21PM (#1278820)

      ... to Kotlin.

  • (Score: 3, Insightful) by bzipitidoo on Thursday October 27 2022, @04:36PM

    by bzipitidoo (4388) Subscriber Badge on Thursday October 27 2022, @04:36PM (#1278780) Journal

    I haven't used Java since version 6, and woof, what a resource hog it was then. A little data collection program somehow needed half a megabyte of RAM. That task should've been possible in less than 16K.

    From the little I've heard over the years since, Java hasn't changed much on its hunger for resources. If so, then this condensing strikes me as both welcome and conceptually easy, if not so easily implemented.

  • (Score: 1, Funny) by Anonymous Coward on Thursday October 27 2022, @05:01PM (1 child)

    by Anonymous Coward on Thursday October 27 2022, @05:01PM (#1278784)

    Gosling has done his damage, let the world move on.

  • (Score: 3, Insightful) by istartedi on Thursday October 27 2022, @05:21PM

    by istartedi (123) on Thursday October 27 2022, @05:21PM (#1278789) Journal

    So, basically an improved JIT (Just In Time compiler) with annotations so programmers can feed it hints? It's hard to get excited about this because as others have pointed out, there don't seem to be a lot of new Java projects starting these days. This sounds like something that might appeal to an organization with a large Java code base where performance is becoming an issue and it's too expensive to re-write. It might very well make some sales. It just doesn't sound all that interesting to me, and I think a lot of people here feel the same way.

    --
    Appended to the end of comments you post. Max: 120 chars.
  • (Score: 4, Insightful) by kazzie on Thursday October 27 2022, @07:31PM (1 child)

    by kazzie (5309) Subscriber Badge on Thursday October 27 2022, @07:31PM (#1278824)

    Using a project named Leyden (on a .jar file) in order to make it condenser, well that exceeds my capacity for praise.

    • (Score: 3, Funny) by c0lo on Thursday October 27 2022, @08:14PM

      by c0lo (156) on Thursday October 27 2022, @08:14PM (#1278828) Journal

      Shocking, ain't it?

      --
      https://www.youtube.com/watch?v=aoFiw2jMy-0
  • (Score: 1, Insightful) by Anonymous Coward on Friday October 28 2022, @09:00AM (1 child)

    by Anonymous Coward on Friday October 28 2022, @09:00AM (#1278948)

    It's almost pointless to speed up code these days. Everything runs in a fucking browser and the wait problem isn't the code, it's the network traffic fetching all the javashit and the reports back to google and MS that take all the time.

    • (Score: 1, Insightful) by Anonymous Coward on Friday October 28 2022, @10:01AM

      by Anonymous Coward on Friday October 28 2022, @10:01AM (#1278956)

      Unless it actually isn't running in a browser. If you can make more money when the code is faster, you'll want it faster.

(1)