Re: Migrate app to 64-bit by Ondrej
Ondrej
Wed Jul 30 01:59:12 CDT 2008
Igor Tandetnik napsal(a):
> "micro" <micro090909@yahoo.com> wrote in message
> news:u5OuyD17IHA.3696@TK2MSFTNGP04.phx.gbl
>> 1. What're the major benefits of migrating an app from 32-bit to
>> 64-bit, besides running fast?
>
> 64-bit app is unlikely to run faster than an equivalent 32-bit app,
> unless it belongs to a rare class of applications that benefit from huge
> amounts of accessible RAM. If your application can efficiently use more
> than 2GB of RAM, there's a benefit to switching to 64 bit. Otherwise,
> there are only downsides.
There is one more case where 64b may be handy, and that is when you are
running out of virtual space. This commonly happens with games, which
use the address space not only to access RAM, but also video card
drivers map significant portions in the virtual address space for their
own purposes. Our experience is we can allocate only about 1 GB RAM
before hitting the virtual space limit - and once we hit the limit, all
kinds of bad start to happen, because video card driver programmers seem
not count with a possibility of failed virtual memory allocations.
There might be cases other than games where 64b address space may help
you, because you no longer need to care about address space limits or
fragmentation, which opens door to some interesting techniques (like
growing arrays with huge virtual address space reserved which is
committed later as needed, avoiding the copy on resize)
> 3. What're the major concerns when developing a 64-bit app?
The performance and memory hit for being 64b can be significant - memory
hit depending on how much pointers do you data structures contain (my
guess is for our applications it is something like 5-15 % of data).
Concerns vary depending on what exactly do you intend to do. My concerns
would be:
* Some tools or libraries may be unavailable or badly tested in 64b
environment,
* If you programmed in 32b a lot, you need to take a lot of care to get
rid of habit of pointer-int(32b) conversions and arithmetic, and make
sure you always use proper sized 64b types.
Cheers
Ondrej
(Resending, sent to Igor only by mistake, sorry for that)
>
>> 2. Can an 64-bit app run on a 32-bit processor/Windows version
>> platform?
>
> No.
>
>> 3. What're the major concerns when developing a 64-bit app?
>
> Whether you need one in the first place. What kind of application are
> you thinking of?