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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:42:22+00:00 2026-06-18T09:42:22+00:00

I have always thought that c arrays would be faster than std::array in C++

  • 0

I have always thought that c arrays would be faster than std::array in C++ but I have done some benchmarking based off the accessing speeds and it appears that the std::array is faster. Why is that?

  • 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-18T09:42:23+00:00Added an answer on June 18, 2026 at 9:42 am

    The answer is “it depends”, or perhaps better put as “nobody knows”, as this type of question is always tightly coupled with compiler optimisations, processor architecture and many other factors.

    I would also like to point out that if you find one better on one system, it may not reflect that it’s better in a diffferent situation – e.g. different compiler or different processor or different operating system. If the overall solution is very similar [and I believe they are in this case], the results of small differences in code generation, or differences in processor architecture can alter the results in either direction. Or for example how well memory allocations line up with cache-lines or virtual memory pages to avoid “extra work”.

    ALWAYS when discussing performance, never guess and don’t ask on the internet. Measure all the options, measure all options again (on some other platform, different compiler options, etc), and then decide which is better [assuming the code is at all performance critical in first place].

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

Sidebar

Related Questions

Are hashtables always faster than trees? Though Hashtables have O(1) search complexity but suppose
I have these three sub arrays, I would like to make one array that
I have always thought that in order to connect to SQL server using windows
I am a PHP developer and I have always thought that micro-optimizations are not
I have an array collection that I would like to limit to say 100
This is a question that's been nagging me for some time. I always thought
I have always thought it was best practice to be explicit in naming my
I am a self thought hobby programmer and therefore don't have the fundamentals always
I have a 2-dimensional jagged array (though it's always rectangular), which I initialize using
I have always used the mouseover event, but while reading the jQuery documentation I

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.