• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. HotSpot
  4. PerformanceTechniques

Page History

Versions Compared

Old Version 3

changes.mady.by.user John Rose

Saved on Apr 03, 2008

compared with

New Version 4

changes.mady.by.user Martin Buchholz

Saved on Apr 20, 2008

  • Previous Change: Difference between versions 2 and 3
  • Next Change: Difference between versions 4 and 5
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: typo

...

  • The server compiler likes a loop with an int counter (int i = 0), a constant stride (i++), and loop-invariant limit (i <= n).
  • Loops over arrays work especially well when the compiler can relate the counter limit to the length of the array(s).
  • For long loops over arrays, the majority of iterations are free of individual range checks.
  • Loops are typically peeled by one interationiteration, to "shake out" tests which are loop invariant but execute only on a non-zero tripcount. Null checks are the key example.
  • If a loop contains a call, it is best if that call is inlined, so that loop can be optimized as a whole.
  • A loop can have multiple exits. Any deoptimization point counts as a loop exit.
  • If your loop has a rare exceptional condition, consider exiting to another (slower) loop when it happens.

...

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 290, "requestCorrelationId": "588287fdea3ff022"}