Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Delphi XE 2: 64-bit performance

Hybrid View

  1. #1

    Delphi XE 2: 64-bit performance

    Has anybody done any performance benchmarks for using Integer vs NativeInt in 64-bit Delphi XE 2 applications?

    I know Windows has adopted LP64 architecture, where Integer and Cardinal are both 32-bit. However, I suspect that it might be easier to optimize code when using native 64-bit integers, but it would probably increase the demand on memory bandwidth if the code does not fit in the registers, although there is still CPU cache that may help.

    Are there any performance benchmarks for 64-bit code compiled in FreePascal?

    The only article I could find so far is about FPU performance in Delphi XE 2. Check it out here.

    I've done my own tests with FPU but on Beta/RTM build so I think I'm still under NDA. The only thing I can say is to confirm the results of the article, 64-bit FPU performance is vastly improved in Delphi XE 2.

  2. #2
    Due to lack of replies for the whole week it seems that nobody cares about this. Who needs speed in games anyway?

    Another interesting article is about using Single vs Double performance in Delphi XE 2: clicky.

    After getting Delphi XE 2 Pro, I've done some experiments with speed. Indeed, in certain scenarios using NativeInt is faster on 64-bit, mostly because this avoids conversion from 32-bit integer to 64-bit and allows the compiler to optimize the code better. However, this is only noticeable in certain scenarios and in some cases it increases memory footprint.

    I don't understand why they removed support for 80-bit floating-point values (Extended). Also, considering that on 64-bit system intermediary calculations are made in 128-bit (RAX:RDX), I wonder why they didn't include Int128 and UInt128?

  3. #3
    I think the lack of replies are due to few of us having Delphi XE2 or the means to benchmark in general.

  4. #4
    a good test is the shader samples. Use the "benchmark" button on transitions and I see a significant difference between 32 and 64 bit. 64bit being much faster.
    The views expressed on this programme are bloody good ones. - Fred Dagg

  5. #5
    Quote Originally Posted by Lifepower View Post
    Due to lack of replies for the whole week it seems that nobody cares about this. Who needs speed in games anyway?
    No, who wants to pay for his IDE when we have Lazarus?

  6. #6
    There is a GREAT difference in using SIngle and Double in 64Bit compiler in XE2. Double in XE2 is faster twice as Double in XE and below. BUT Single is 3 times slower than in 32bit. And 5 times slower than Double.
    So, use Double whenever it's possible.

    Didn't notice link given by Lifepower about this new "feature".
    Embarcadero still advice to use Double instead of Single.
    Theory is - when you know everything but nothing works.
    Practice is - when all works, but you don't know why.
    We combine theory and practice - nothing works and nobody knows why

  7. #7
    Note that there is a new compiler directive that makes Single performance faster in 64-bit mode:
    http://delphitools.info/2011/09/09/h...precision-off/
    But it is not on by default.
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  8. #8
    Yeah and embarcadero deprecate to turn it on.
    Theory is - when you know everything but nothing works.
    Practice is - when all works, but you don't know why.
    We combine theory and practice - nothing works and nobody knows why

  9. #9
    Quote Originally Posted by User137 View Post
    No, who wants to pay for his IDE when we have Lazarus?
    My question was also about 64-bit performance in FreePascal (check my first post), so thanks for participating.

    I actually thought there will be more performance benchmarks for FreePascal on 64-bit platform because it was available for quite some time now and there might be some similarities between 64-bit FreePascal and Delphi's compiler.

    As for Delphi XE 2: on 32-bit platform using Single (with $ExcessPrecision flag turned off) is faster, while on 64-bit using Double is faster. However, I'd still complain that Extended type has been truncated to 64-bit. In some specific cases where you need extra precision, it was really useful.

  10. #10
    Hello, this is my 1st post to the Pascal Game Development Forum
    I do believe that any x64 application benefit from x64-mode due to faster arithmetic operations than in x86-mode. May be the benefit is not that straightforward, and as you already said compiler optimizer has more room to work in, but it seems to be general too. Look, I came across opinions that SQL Server x64 is faster than x86 not only due to amount of memory it could address but arithmetic ops too. I wonder what's going on with performance when x86 app runs in WoW64 mode on Windows x64.
    Prime95 is an example of extremely optimized x64 application which has assembly language functions optimized for different processor architectures and separate executable for x86 and x64 modes.
    In very near future we could see a quite of programs written in Delphi packaged for Windows x64.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •