Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes I meant "a 32-bit application under 64 bit linux".
What is the reason you say so? May be for heavy allication with lot of memory operation it make sense to make 64-bit application.
Well, you didn't say what you were running, or what your desired result was. I was generalizing, but if your app can take advantage of the 64 bit address space (and the libraries, OS, and other parts can too), it'll probably run faster than a 32 bit app in a 64 bit space.
Unless you're seriously crunching things, though, I doubt you'd see a huge speed difference.
For most applications it will make no significant difference.
For lots of applications, a 32 bit version will be a little faster because 64 bit pointers are bigger and applications may store a lot of pointers resulting in more cache misses for the 64 bit version.
For some applications, the 64 bit version will be moderately faster because the 64 bit architecture has more registers and the GCC compiler is rather stupid about architectures that have too few registers and some code will be optimized badly for 32 bit because of that.
(As I recently overlooked in a similar thread) I think a few applications will run a lot faster in 64 bit because they can make good use of CPU features such as SSE. Those CPU features are also available in 32-bit mode, but probably aren't used by 32 bit binaries. I don't know whether the GCC compiler can't be made to use those features for 32-bit binaries or whether it can be made to but requiring some special action in source or build syntax that typically isn't there. Either way, the bottom line for an ordinary user of 32 bit executables is that those CPU features aren't used.
All of the above overlooks the direct benefits of 64 bit mode: much better support for 64 bit integers ("long long" data type in C++) as well as virtual addresses beyond 4GB. It think overlooking those is best because those direct benefits of 64 bit mode are probably even less used by ordinary applications, than special CPU features such as SSE.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.