Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-other / 2011-04

Delphi on x64

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

-----8<-----
DavidI's demo highlighted a problem with 64-bit stuff, viz it is not clear to me what the Delphi programmer on the street is going to do with it. Intersimone was reduced to printing out sizeof(Pointer), which seemed a paltry reward for the effort that has gone into building the thing.

I suppose it would enable one to manipulate large video files, and to have a huge in-memory databases. What else? Is there a significant speed gain for running native 64-bit? I know that it is important to store time measured in seconds since 1970 in a 64-bit integer, but the 32-bit integer is surely big enough for most other calculations. Perhaps this will help with currency handling accuracy - we all know the Dead Granny story of the programmer who accumulated all the half cent roundings in his own account.

I noticed there was emphasis that this was /Windows 64/ support - ie that other platforms are coming soon, so perhaps Embaracdero have similar doubts.
----->8-----

So far the best answer appears to be that customers who've bought 64-bit systems expect software for them.

I presume that 64-bit systems allow significantly more memory per process, and that the wider registers simplify address handling. I can also see them being useful for IP6. But apart from that is anybody here running software which is significantly easier to implement on 64-bit than on 32-bit systems?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Lukas Gradl
to Mark Morgan Lloyd
Show quoted text 8 lines
So far the best answer appears to be that customers who've bought 64-bit systems expect software for them. I presume that 64-bit systems allow significantly more memory per process, and that the wider registers simplify address handling. I can also see them being useful for IP6. But apart from that is anybody here running software which is significantly easier to implement on 64-bit than on 32-bit systems?

I've done several libraries loaded by the OS - in most cases the library has to match the underlying OS. e.g. we're using a printer monitor DLL on Windows - it has do be compiled as 64 bit as print monitors can not use the 32bit compatibility-layer.

Another thing where I really love using 64 bits are high-performance server-processes - in some cases it's really useful to cache data in Memory. So with 64bits OSes I don't have to worry about Memory-footprint for caching.

OK, it would be possible to implement these special cases using C or C++
- but why doing so, when the rest of the project is written using pascal?

regards
Lukas

-------------------------- software security networks Lukas Gradl <fpc#ssn.at> Eduard-Bodem-Gasse 5 A - 6020 Innsbruck Tel: +43-512-214040-0 Fax: +43-512-214040-21 --------------------------

Reply by email

Hans-Peter Diettrich
to Lukas Gradl
I've done several libraries loaded by the OS - in most cases the library has to match the underlying OS. e.g. we're using a printer monitor DLL on Windows - it has do be compiled as 64 bit as print monitors can not use the 32bit compatibility-layer.

Yes, that's the biggest practical advantage - cooperation with OS or other applications, which require 64 bit modules.

Another thing where I really love using 64 bits are high-performance server-processes - in some cases it's really useful to cache data in Memory. So with 64bits OSes I don't have to worry about Memory-footprint for caching.

Such applications can wait, until the available RAM increases considerably. Caches then can become bigger than 2GB in 32 bit mode, but they still must respect physical boundaries. When every process starts to use RAM without care, then even the biggest machine will start swapping :-(

DoDi

Reply by email

Mark Morgan Lloyd
to Lukas Gradl: I've done several libraries loaded by the OS - in most cases the library has to match the…
Lukas Gradl wrote 21 lines
> So far the best answer appears to be that customers who've bought 64-bit > systems expect software for them. > > I presume that 64-bit systems allow significantly more memory per > process, and that the wider registers simplify address handling. I can > also see them being useful for IP6. But apart from that is anybody here > running software which is significantly easier to implement on 64-bit > than on 32-bit systems? I've done several libraries loaded by the OS - in most cases the library has to match the underlying OS. e.g. we're using a printer monitor DLL on Windows - it has do be compiled as 64 bit as print monitors can not use the 32bit compatibility-layer. Another thing where I really love using 64 bits are high-performance server-processes - in some cases it's really useful to cache data in Memory. So with 64bits OSes I don't have to worry about Memory-footprint for caching. OK, it would be possible to implement these special cases using C or C++ - but why doing so, when the rest of the project is written using pascal?

Elsewhere, somebody has pointed out that in mapping programs the space available on a 32-bit system is marginally adequate for a representation of all possible connections between towns in a single country. As soon as you start looking at a bigger area like the EU you either need to start using some form of compression, or you need a larger address space.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Travis Siegel
to Mark Morgan Lloyd: -----8<----- DavidI's demo highlighted a problem with 64-bit stuff, viz it is not clear…
Mark Morgan Lloyd wrote
I suppose it would enable one to manipulate large video files, and to have a huge in-memory databases. What else? Is there a significant speed gain for running native 64-bit?

There is a significant speed increase for running 64-bit vs the same program in 32-bit mode. Especially when manipulating graphics, calculating large spreadsheets, or similar functions. Recoding an avi file into mp4 in 64-bit mode is significantly faster than the same process in 32-bit mode.
It also makes existing video decoding much faster, thereby providing a cleaner video output.
I personally care little for these things, since I can't see the stupid video myself, but others have commented on how much faster things show up on screen, and how much crisper the video looks when it does so.
Creating large compressed archives is faster too, though I'm not sure why, I didn't think rar or arj or zip used any 64-bit code, perhaps it's just because larger hunks of memory can be moved at once, and that provides faster compression times.
I'm sure that in time, other benefits will show up as folks experiment with 32/64-bit manipulations.
One person was highly impressed with the amount of time it took a dvd package to create the final product in 64-bit mode over it's 32-bit execution times, but I didn't get numbers, so don't know what the actual times were, though they certainly appeared to be significant. I'd wager anything relying on math, algorithms, or encryption will run faster regardless of whether it's coded specifically for 64-bit mode or not, since the cpu can bite off larger chunks.

Reply by email

Jonas Maebe
to Travis Siegel
Travis Siegel wrote
There is a significant speed increase for running 64-bit vs the same program in 32-bit mode. Especially when manipulating graphics, calculating large spreadsheets, or similar functions. Recoding an avi file into mp4 in 64-bit mode is significantly faster than the same process in 32-bit mode.

The main reason is that x86-64 adds 8 extra registers that you can use compared to 32 bit mode. For tight loops, keeping more data in registers can make a big difference. That's specific to i386 vs x86-64 rather than 32 vs 64 bit, since on most architectures the 32 and 64 bit versions have the same number of registers (just 32 vs 64 bit in size).

Jonas

Reply by email