#1 2013-02-25 08:19:41

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Major step in 64 bit compatibility

I was able to fix some issues in SynCommons.pas and other units (including SynLZ.pas which was not working as expected!).
Some minor modifications, but a bit difficult to track and identify.
Internal RTTI about records and dynamic arrays is working. The same for logging, exception interception, and such.
See http://synopse.info/fossil/info/dc441f2a68 and http://synopse.info/fossil/info/b678666282

Here are the corresponding regression tests logs:

   Synopse mORMot Framework Automated tests
  ------------------------------------------


1. Synopse libraries

 1.1. Low level common:
  - System copy record: 22 assertions passed  115us
  - TDynArray: 959,443 assertions passed  107.19ms
  - TDynArrayHashed: 1,200,629 assertions passed  80.14ms
  - Fast string compare: 7 assertions passed  93us
  - IdemPropName: 10 assertions passed  81us
  - Url encoding: 105 assertions passed  705us
  - IsMatch: 599 assertions passed  169us
  - Soundex: 35 assertions passed  98us
  - Numerical conversions: 790,295 assertions passed  77.87ms
  - Curr64: 20,053 assertions passed  1.36ms
  - CamelCase: 5 assertions passed  109us
  - Bits: 4,614 assertions passed  121us
  - Ini files: 7,004 assertions passed  47.31ms
  - Unicode - Utf8: 65,089 assertions passed  688.79ms
  - Iso8601 date and time: 24,000 assertions passed  3.19ms
  - Url decoding: 1,100 assertions passed  225us
  - TSynTable: 41 assertions passed  1.37ms
  - TSynCache: 404 assertions passed  125us
  - TSynFilter: 804 assertions passed  1.46ms
  - TSynValidate: 677 assertions passed  448us
  - TSynLogFile: 42 assertions passed  308us
  Total failed: 0 / 3,074,978  - Low level common PASSED  1.01s

 1.2. Cryptographic routines:
  - Adler32: 1 assertion passed  354us
  - MD5: 1 assertion passed  310us
  - SHA1: 5 assertions passed  82us
  - SHA256: 5 assertions passed  72us
  - AES256: 6,372 assertions passed  117.08ms
  - Base64: 11,994 assertions passed  51.76ms
  Total failed: 0 / 18,378  - Cryptographic routines PASSED  171.54ms

 1.3. Compression:
  - In memory compression: 12 assertions passed  192.96ms
  - Gzip format: 19 assertions passed  364.65ms
  - Zip format: 36 assertions passed  667.72ms
  - SynLZO: 3,006 assertions passed  50.98ms
  - SynLZ: 3,006 assertions passed  68.74ms
  Total failed: 0 / 6,079  - Compression PASSED  1.34s

 1.4. Synopse PDF:
  - TPdfDocument: 4 assertions passed  4.41ms
  - TPdfDocumentGDI: 3 assertions passed  21.30ms
  Total failed: 0 / 7  - Synopse PDF PASSED  26.14ms


Synopse framework used: 1.18
Generated with: Delphi XE3 64 bit compiler

Time elapsed for all tests: 2.56s
Tests performed at 25/02/2013 08:57:10

Total assertions failed for all test suits:  0 / 3,099,442
! All tests passed successfully.

This was run with optimization=ON at compile time.
Timing is a bit disappointing - those tests are slower in 64 bit mode than in 32 bit mode.
Perhaps it is due to the Delphi RTL, not mORMot internal.
From the generated code point of view, the 64 bit asm is somewhat well produced, when optimization is set to ON.
It is comparable to the x86 level, and better than the FPC generated x64 code, for instance.

The x64 compiler makes huge profit for floating-point process (using SSE2), but the 16 registers of x64 seem not to imply a much better performance than x86, even if they are used by XE2/3.
Perhaps the performance issues come from the Delphi RTL itself, and the doubled pointer size (from 4 bytes to 8 bytes - and more memory lead into more CPU cache misses - this is the reason of x32 ABI).

When all this will be finished, I'll certainly post some blog articles about x64 code generation by Delphi XE2/3 and speed comparison to x86/32bit code generation.

The first step is done.
Next steps are:
- Use external sqlite3.dll (I will probably add two new units, SynSQLite3Static.pas and SynSQLite3Library.pas - which will be fill the SQLite3 API functions prototypes supplied by SynSQlite3);
- Convert mORMot.pas unit.

Any feedback is welcome!

Offline

Board footer

Powered by FluxBB