32bit vs 64bit Desktop Apps



  • Hi,
    I have been maintaining a Qt desktop application for several months and I wonder if there is a real/significant difference between running a 32bit Qt application from a 64bit operating system compared to the 64bit version of the same software.
    Does it worth to maintain two versions of the same application? or the 32bit should be enough to support 32/64 bit operating systems? Is there a real/significant difference if we are talking about Windows or Linux applications?

    I'll appreciate any feedback about this matter. Thanks!


  • Qt Champions 2016

    @xtingray
    Hello,

    if there is a real/significant difference between running a 32bit Qt application from a 64bit operating system compared to the 64bit version of the same software.

    Yes there are significant differences that go as deep as assembly and register sizes, memory addressing and so on.

    Does it worth to maintain two versions of the same application?

    Depends on the platform and the overhead you're willing to live with (relevant for windows). I firmly believe x64 should be the preferred architecture and x86 is to be provided as a compatibility layer only, but that's just me. Most windows developers are not as pedantic, including those that work in MS.

    Is there a real/significant difference if we are talking about Windows or Linux applications?

    Quite real and significant.

    Linux keeps (at least my Debian does, but should apply to most other distros) a full set of x86 libraries for that case. To run a 32bit app on my 64bit Linux I have to add a foreign architecture to the package manager and install the whole dependency tree for the application (this includes, but is not limited to all the Qt libs, the C runtime, the C++ standard library and so on). That's one of the reasons I just threw Skype away - I'm not maintaining 300MB of 32 bit libraries just to run that buggy application.

    On Windows 32bit applications run through the WOW64 emulation layer, but I'm not intimate with it. It's something of a middleware between the application and the OS and provides 32bit compatible API for the application. However you should really search MSDN if you want to know more, or just wait for some of the Windows gurus to get a better answer on that.

    All these considerations are not taking into account that with 32bit you're not making use of the (possible) additional instructions your 64bit CPU provides, thus some operations are just emulated (either through the CPU op code or inside the C/C++ libraries) instead of being directly invoked through an asm instruction.

    Kind regards.


  • Lifetime Qt Champion

    Hi,

    As an addition to the very good points @kshegunov made, you also have to take into account the amount of memory your application might need. If you are for example writing an intensive video processing application you might quickly hit the 2GB limit.

    After that, it also depends on your target audience. if non of them uses a 32bit version of Windows then don't bother to maintain two versions.



  • Thank you for this handy information guys! :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.