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

  • Home
  • SEARCH
  • 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 3347580
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:26:19+00:00 2026-05-18T01:26:19+00:00

This is an efficiency question about 64 bit ints. Assuming I don’t need to

  • 0

This is an efficiency question about 64 bit ints. Assuming I don’t need to modify the value of a “int” parameter, should I pass it by value or reference.

Assuming 32 bit machine:

1) 32 bit int: I guess the answer is “pass by value” as “pass by reference” will have overhead of extra memory lookup.

2) 64 bit int: If I pass by reference, I only pass 32 bit address on the stack, but need an extra memory lookup. So which one of them is better (reference or value)?

What if the machine is 64 bit?

regards,

JP

  • 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-18T01:26:20+00:00Added an answer on May 18, 2026 at 1:26 am

    Pass by value – definitely. If the system is 64-bit it means it copies 64-bit word extremely fast.

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

Sidebar

Related Questions

I have a question about improving the efficiency of my program. I have a
EDIT Public health warning - this question includes a false assumption about undefined behaviour.
This is probably a quite exotic question. My Problem is as follows: The TI
I've read a fair amount of stuff about efficiency of array indices vs. pointers,
I'm having a hard time phrasing this question in such a way that doesn't
This is just an out of curiosity question. Let's say you have a database
This question is inspired by the remark of Duncan Murdoch on the r-devel mailing
I understand that this question may seem somewhat ungrounded, but if someone knows anything
This is almost the same question than here , except that I am asking
This is undeniable: multicore computers are here to stay. So is this: efficient multicore

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.