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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:43:17+00:00 2026-06-08T08:43:17+00:00

For whatever reason there was no notion on that in Performance Characteristics Doc ,

  • 0

For whatever reason there was no notion on that in Performance Characteristics Doc, so I dug into the sources and found out that List and Queue seem to have O(n), since they iterate thru all members. The Vector seems to have O(1), since it simply subtracts one Int from another.

Now, it doesn’t matter whether the collection is append- or prepend-oriented, but either one of them must be O(1), and there’s no need for performant apply.

Is Vector the correct choice? Which would you suggest?

  • 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-08T08:43:18+00:00Added an answer on June 8, 2026 at 8:43 am

    Is Vector the correct choice?

    Yes. An alternative would be to create your own immutable wrapper around List, adding its size as constant, but it would be a lot of work if you want to allow all standard collection operations. Stick to Vector.

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

Sidebar

Related Questions

I've got a stylesheet that will not, for whatever reason, apply list-style-type to a
On whatever reason this is not working (says 'file not found'), set in=c:\myprogram\_save cd
I have an ASP.NET web application that, for whatever reason, when it is deployed
We've written a RESTful server API. For whatever reason, we made the decision that
For whatever reason, when I apply a CSS transform to a paragraph that already
...which I cannot seem to figure out, for whatever reason. I've tried cleaning my
I'm trying to install django file picker, but for whatever reason, it appears that
Our style guide says (for whatever reason that isn't important to this question) no
For whatever reason, I have a lot of clients that have existing data that's
There is this little trick question that some interviewers like to ask for whatever

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.