Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Move to 64bit for Application
Wed, May 10 2017 11:08 AMPermanent Link

Adam Brett

Orixa Systems

I already use the EDB Server 64 bit version as the db engine for all my db applications. It is super fast and I am really happy with it.

However I am still building my Delphi Exe's as 32 bit files.

I am thinking of moving to compiling all my Exes for 64 bit, as I don't think I have any remaining 32 bit users.

My programmes are pretty straight forward data-base applications, I use Raize and DevEx components plus Fast Reports.

Do other EDB users have experiences? Was it hard?

Particularly:
* are there real gains to be had / is it worth doing?
* Are there horrible gotchas to be avoided?

Thanks in advance.
Wed, May 10 2017 11:43 AMPermanent Link

Matthew Jones

Adam Brett wrote:

> I am thinking of moving to compiling all my Exes for 64 bit

The key question is why? 64-bit will give you more memory to play with. Lots of it, if the user has a suitable computer. But do you use that memory in your application? If not, don't bother. 64-bit will slightly slow your code down as everything has to shuffle more data. It isn't worth the effort unless you can actually use the memory.

--

Matthew Jones
Thu, May 11 2017 10:26 AMPermanent Link

Adam Brett

Orixa Systems

Thanks Matthew

I am trying to figure out whether it is worth the effort, not having done it I don't really know what the benefits are.

My assumption is that a program would run much faster ... if it did this would make it worth the effort.

I don't need it to do it in order to cope with any issues within my programs, which are running fine.

If it doesn't speed things up massively I'm not sure its worth it!

--

That said: People who have done it, is it a lot of work?
Thu, May 11 2017 11:03 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Adam


I have two views, one extremely cynical and the other a bit more realistic.

The cynical one goes

The two reasons to keep moving to faster computers, more memory, faster disks etc is one  because the quality of software development keeps going down. Partly that's people leaving it up to the compiler to optimise things and not realising that all it can do is optimise the crud its been given not choose a better approach. Number two is the constant addition of features and enhancements some of which may even be used people other than Alfred E. Neuman


The less cynical version goes

If you have something computationally intense then the faster the machine the better the rest of the time I shouldn't be able to type, read, or think what to do next faster than the machine can keep up.

Handling more bits at a time should speed things up UNLESS that's not what's holding things back - is your application disk bound, is the network to slow, is the user sitting there twiddling his thumbs trying to decide which doughnut to eat next.

My old Dell laptop which has 32 bit Vista on it and has been re-purposed as a server without external connections can outperform quite a few of the 64 bit machines on the market.

Roy Lambert
Thu, May 11 2017 12:27 PMPermanent Link

Raul

Team Elevate Team Elevate

On 5/11/2017 10:26 AM, Adam Brett wrote:
> I am trying to figure out whether it is worth the effort, not having done it I don't really know what the benefits are.
> My assumption is that a program would run much faster ... if it did this would make it worth the effort.

No - most applications are not going to see performance improvements
simply by switching to 64bit.

Memory interface in general remains the same - in terms of CPU/bus/ram
access etc.

There are more CPU registers so if compiler is aggressively optimized to
take advantage of those then maybe tiny bit but again this is very much
an edge case. There might be additional CPU level differences but again
nothing i've ever seen to make a difference.

Internally pointers and structures are 64bit so technically there is
more data that needs to be shuffled around.

Reasons you want to switch to 64bit in my view
- you want/need to use more RAM (#1 reason)

- you need to interact with 64bit DLLs or devices or such  (note that
this goes both ways - if you need to interact with 32bit DLLs etc today
then you will break that by switching to 64bit)

- PR reasons : your customers (maybe RFP asks) if you're 32 or 64 bit

- you believe Microsoft will deprecate and remove 32bit exe support down
the line

I know car analogies are cheap way out but this is bit like getting a 2-
wheel drive vs 4 wheel drive version of the same model car.
Your top speed likely does not improve (and might decline due to greater
weight); your off road/bad weather capability might improve (more ram in
app or maybe interacting with DLLs) but most of the time these models
"drive about same"


> I don't need it to do it in order to cope with any issues within my programs, which are running fine.

Then see if any of the reasons above are worth it to you

>
> That said: People who have done it, is it a lot of work?
>


Assuming you're on a modern delphi compiler that already has 64bit
support and your app is pure pascal then it's generally just a matter of
adding 64target and recompiling and it should work.

Issues that might come up :

- make sure your components have 64 bit versions (for edb you need to
use both 32 and 64bit installers)

- if you're using/importing external DLLs then those need to be 64 as well

- if you're using pointers and making assumptions about size then that
might be an issue

- if you have any code that uses assembly then that is likely 32bit only

All i can think of right now.

Raul
Fri, May 12 2017 3:52 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Raul


>I know car analogies are cheap way out but this is bit like getting a 2-
>wheel drive vs 4 wheel drive version of the same model car.
>Your top speed likely does not improve (and might decline due to greater
>weight); your off road/bad weather capability might improve (more ram in
>app or maybe interacting with DLLs) but most of the time these models
>"drive about same"

You missed (based on personal experience)

<<and your fuel consumption will go up, and you'll probably have to change your tyres more often>>

Roy
Image