Develop for x86 and x64 platforms

3

Increasingly, operating systems are prioritizing the "%" version of%, so the development of applications for this architecture is increasingly attractive.

  • Based on this scenario, I ask you what are the advantages / disadvantages of developing for the x64 platform?
  • To take advantage of this architecture you need some specific application, eg: Editing images, Games, etc?
  • My project is set to 64bits will I automatically have 32 and 64bit versions?
asked by anonymous 07.01.2016 / 13:51

1 answer

4

In general, you do not need anything specific, even more so in .Net that turns into what platform it will run on. Of course there may be some incompatibilities with things that are external to .Net and are in 32 bits. Native code has more difficulty in reconciling the two forms, even if possible. .NET compiles to native code the way you tell it to run and turns to make everything work inside it.

.Net will adjust the application to what is most appropriate where it is run. Rules can change. As far as I know, today the default is to try to use 32 bits whenever possible (loaded in a 32 bit process). You can configure this on the target machine.

In most cases it will not cause problems, but some people say that #, but I do not know if this is still valid. Of course this has its disadvantages.

Advantages

The biggest advantage of using 64 bits is the ability to address more than 4GB of memory. What in practice means being able to access more than 2GB of memory in the same application.

Another advantage is that some processor instructions and registers can be accessed in this mode, can perform better and do some extra things. Especially large number calculations can be done in fewer cycles. "Long" integers and double precision numbers fit into the recorder. This is not the same as saying that the application will be faster. See the disadvantages.

We can also count on the advantage of running directly on unadapted 64-bit operating systems.

Another advantage that is not intrinsic, but in practice is happening with .NET. Before it was a disadvantage, everything that was for 64 bits was something second class. Now investments are being made in tools for this architecture. And they are using more modern techniques. Increasingly we will have better 64-bit and 32-bit tools. A clear example is the new JITter ( whats ).

Disadvantages

Not everything is flowers.

Memory consumption increases since all addressing needs 8 bytes instead of 4. It's nothing that makes so much difference in almost all cases. If you usually adopt the rule of using only a 32-bit operating system with a machine with at least 4GB of memory.

This can mess up the cache a bit, which today is one of the things that most help performance. The larger the information, the fewer of them fit in the cache, which is quite small. This is a real problem that people often neglect. The same goes for firing the garbage collector and pressing the stack .

If the operating system is 32-bit, it does not rotate. This is not a problem for. Net because it can choose. Unless the application requires memory consumption above 2GB.

Add-on . Differences .

    
07.01.2016 / 14:27