[DUG] Int64 or floating point faster?
Jolyon Smith
jsmith at deltics.co.nz
Sun Aug 17 11:52:11 NZST 2014
I think there are too many variables involved to give an answer to this
question without some of those variables being reduced to known values.
e.g. what hardware ? what version of Delphi ? x64 target or x86 ? what
precision of floating point ?
Having said that, in a quick test knocked up in my Smoketest framework I
found that Double comfortably outperforms Int64 when compiling for Win32
but that both Double and Int64 demonstrated improved performance when
compiling for Win64 and that whilst Double still showed some advantage it
was not as significant (and in some test runs the difference was
negligible).
If you are targeting FireMonkey you will have to bear in mind that the
back-end compiler is different to the x86/x64 backend, so results obtained
using the WinXX compilers will not necessarily be indicative of performance
on the ARM or LLVM platforms.
Conditions:
- Delphi XE4
- Running in a 64-bit Win 7 VM
- No testing was done for correctness of the results.
On 16 August 2014 15:30, Ross Levis <ross at stationplaylist.com> wrote:
> Would I be correct that int64 multiplications would be faster than
> floating point in Delphi? My app needs to do several million.
>
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
> Subject: unsubscribe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20140817/e4eb2d07/attachment.html
More information about the Delphi
mailing list