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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:43:29+00:00 2026-06-10T16:43:29+00:00

Considering an int will be 4 bytes on a 32-bit system and 8 bytes

  • 0

Considering an int will be 4 bytes on a 32-bit system and 8 bytes on a 64-bit system, why is float not treated the same? Why is size of a double != size of a float on a 64-bit system? Considering that the best native integer type is selected when I declare an int (which results in higher performance), shouldn’t the same happen for float (which also results in a performance increase)?

Related question: Is it a bad idea to declare a type my_float (pardon the name!) that is float on 32-bit systems and double on 64-bit systems?

  • 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-10T16:43:31+00:00Added an answer on June 10, 2026 at 4:43 pm

    Your question is based on a false premise. On most modern 64-bit systems, int is still 4 bytes. Why consume twice as much memory and twice as much memory bandwidth when such large integers are so rarely needed? On typical modern 64-bit systems, math on 64-bit integers is not faster than math on 32-bit integers, so there’s no benefit to be had.

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

Sidebar

Related Questions

Assume my system as 32 bit machine. Considering this if I use long int
I am considering creating some JSP-tags that will always give the same output. For
Considering that simple java code which would not work: public class Bar extends AbstractBar{
Considering that the two machine's time settings are not synced, is it still possible
Considering this code: std::vector<myObject*> veryLargeArray; for (int i = 0; i < veryLargeArray.size(); ++i)
Considering this code with 3 differents function call semantics: void f(void){ puts(OK); } int
Considering that I have a Schema named SBST I want to find all empty
I'm considering the approaches to write class MyClass { @Get @Set protected int aValue;
I need to set a variable at the beginning of my package that will
Suppose I declare an array as int myarray[5] Or declare it as int*myarray=malloc(5*sizeof(int)) Will

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.