Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6141021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:11:32+00:00 2026-05-23T18:11:32+00:00

I’ve tried using scalac -optimise with version 2.7.7. At that time I never got

  • 0

I’ve tried using scalac -optimise with version 2.7.7. At that time I never got any performance improvements, but the compilation took longer.

Is the situation better in Scala 2.9.0 ? What optimisations are currently covered by the flag ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:11:33+00:00Added an answer on May 23, 2026 at 6:11 pm

    Strange, there was a similar question on the scala-user group:

    Rex Kerr answered at the time (May):

    I have never found a case where production code was significantly sped up by
    using -optimise, at least when using the Sun JVM. I grant that in some
    cases it could happen, but it seems to apply similar optimizations to what
    the JVM does already. Perhaps if there are limits on optimization depth,
    using -optimise would remove a few layers and then allow the JVM to get a
    few more. But I mostly don’t even bother testing it any more, given how
    many cases (dozens) I’ve tried it where the runtime hasn’t changed
    measurably.

    I expect it would have an impact on VMs that are more conservative (e.g.
    JRockit) or less sophisticated (e.g. Dalvik).


    Ismael Juma added:

    The scala distribution is actually compiled with -optimise, but indeed
    it’s not on unless the argument is passed to scalac.

    Is it not mature enough, or could it lead to bugs, changed semantic, etc ?

    As far as I understand, the team decided to be conservative and enable
    it only for the scala distribution as an initial step (in Scala
    2.8.0). Maybe it’s a good idea to consider extending that in the next
    major release.


    For the influence of ‘-optimise‘ (amongst other factors) in Scala2.9, see this scala-language thread called “Scala2.9 slower?”.

    I’m a bit concerned. After seeing that -optimize really does optimize “for comprehensions” on 2.9.0, I then benchmarked the code, and discovered it was about 2.5 times slower than 2.8.1.

    The results leave a… mixed feeling.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.