Loading...

D MySQL performance

posted on Tue, May 27th, 2008

After setting up the D develop environment and compiling the first small programs, I got interested in the mysql performance of D, which basically uses the C library provided by mysql. Therefore I didn't expect to much performance here as PHP uses the same library to connect and query the mysql database. As D is natively compiled there it is slightly faster in the user space.
For the test I used a table with 1.124 million records and selected only the id from the first 100'000 datasets. I run the test 10 times and put the data in the charts below. The database is on the same server as the installation of PHP and D. The PHP version is 5.2.1. For D I used DDBI and Tango.

Real time comparison
D 5.5035.3535.4285.2465.1525.5484.7735.3145.4274.791
PHP 4.8564.9024.8755.1715.2405.2295.6845.1285.1444.937

User time comparison
D 0.5320.4720.5200.5240.4880.4360.2400.5240.4280.384
PHP 1.0161.0721.0361.0361.1201.1601.1681.1401.1401.112

Sys time comparison
D 0.2360.1960.2400.2040.1800.1520.2400.1960.1720.208
PHP 0.1680.1880.2200.2080.2560.2200.2440.1960.2200.228


 
 

Comments

 
 

Leave a Comment

Commenting is not available in this weblog entry.