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 8710417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:37:17+00:00 2026-06-13T04:37:17+00:00

In Java, according to the usage of a collection, we do not use the

  • 0

In Java, according to the usage of a collection, we do not use the same implementation (ie ArrayList vs LinkedList).

Coming from a Java background, can someone tell me what should I know about Scala collections and performance considerations?

It seems the immutable version of Scala List is some kind of immutable LinkedList.
I understand the concepts, following Martin Odersky courses on Coursera.
In the same way i understand why it’s more efficient to prepend than to append, particularly when you have an immutable list.

I would like to know all (or most) of these kind of tricky things about Scala collection performances, so that I do not find it myself the hard way. Can someone help me?

Thanks

  • 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-06-13T04:37:19+00:00Added an answer on June 13, 2026 at 4:37 am

    There’s a document that describes collection performance characteristics. Beyond that, you really should test your use case in a microbenchmark. In some cases, Scala collections are very close in performance to Java ones; in others there’s a gap (e.g. maps); in others there is no Java analog and the immutable vs. mutable comparison depends very highly on how you use the collection (with, obviously, heavy mutation favoring mutable collections, and heavy re-use/copying favoring immutable collections).

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

Sidebar

Related Questions

In Java we use System.setProperty() method to set some system properties. According to this
According to Brian Goetz's Java Concurrency in Practice JVM can't exit until all the
I needed to move some src/test/java to src/main/java according to this recommandation from maven-jar-plugin
How can I randomly generate letters according to their frequency of use in common
When I use Scala^Z3 (Z3 3.2 and according Scala^Z3 java library) and get a
According to JAVA documentation , Connection#commit() can throw SQLException . My question is whether
I'm writing an Android application and use HashMap<String,MyClass> . According to Java and Android
According to Java thread state info calling wait() will result a thread to go
According to the documentation of java.util.Pattern , the POSIX character class \p{Graph} ( [:graph:]
According to the documentation for getResultSet in java.sql.Statement , it says: Retrieves the current

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.