Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8013912

Nashorn needs to reuse temporary symbols

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • None
    • core-libs
    • b91
    • Not verified

      Profiling with --print-mem-usage indicates that symbols are a heavy part of our IR. Running a large script like Mandreel gives us ~ 300000 symbols where the majority are temporaries. Temporaries are only live in one expression tree at a time, so it should be perfectly possible to reuse them (if previous expression trees had created symbols with the type we need for a new temporary) rather than allocating new temporaries every time we need them. This will have immense trickle down effects for our memory usage and also speed up symbol lookups significantly - we do a lot of block.getExistingSymbol in large linked hash maps with plenty of chaining.

            attila Attila Szegedi
            lagergren Marcus Lagergren
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: