Bench1.prg: Sieve of Erotosthenes, 1000 iterations |
6.1.1 seconds |
5.3 seconds |
0.92.0 seconds |
Xbase++ 1.82 seconds |
1. Test for numeric calculations: Number of primes were 303 |
|
|
|
2.46 |
2. Test for string handling: Number of primes were 303 |
|
|
|
10.48 |
3. Test for C-inline usage: Number of primes were 303 |
|
|
|
( 2.46 ) |
Bench2.prg: Database Operations |
||||
1. Create database |
|
|
|
0.090 |
2. Append 10,000 records, exclusive |
|
|
|
0.570 |
3. Append 10,000 records, shared |
|
|
|
0.900 |
4. Replace 2x 10,000 records, shared |
|
|
|
0.940 |
5. Index 10,000 records on character |
|
|
|
0.370 |
6. Index 10,000 records on number |
|
|
|
0.360 |
7. Seek 1000x shared on character |
|
|
|
0.060 |
8. Seek 1000x shared on numeric |
|
|
|
0.070 |
9. Replace 2x 1000x records, shared w. 2 indices |
|
|
|
0.210 |
10. Replace 2x 1000x records, shared w. 2 indices & DbCommit() |
|
|
|
46.450 |
11. Replace 2x 1000x records, shared w. 2 indices & COMMIT |
|
|
|
45.390 |
12. Append 1000x records, shared w. 2 indices |
|
|
|
0.420 |
13. Append 1000x records, shared w. 2 indices & SKIP 0 |
|
|
|
0.400 |
14. Append 1000x records, shared w. 2 indices & DbCommit() |
|
|
|
53.130 |
Bench2.prg: General Calculations |
||||
1. Empty loop 1,000,000 x |
|
|
|
0.110 |
2. Addition 1,000,000 x integer |
|
|
|
0.260 |
3. Addition 1,000,000 x typed int |
|
|
|
0.270 |
4. Increment 1,000,000 x integer |
|
|
|
0.120 |
5. Increment 1,000,000 x typed int |
|
|
|
0.120 |
6. Multiplication 1,000,000 x integer |
|
|
|
0.270 |
7.Multiplication 1,000,000 x typed int |
|
|
|
0.250 |
8.Multiplication 1,000,000 x float |
|
|
|
0.290 |
9. Multiplication 1,000,000 x typed float |
|
|
|
0.240 |
10. Division 1,000,000 x float |
|
|
|
0.350 |
11. Division 1,000,000 x typed float |
|
|
|
0.300 |
All benchmarks are compiled and executed on the same hardware on MS-Windows 2000 SP4. Times in red signals only an extreme difference (more than 10-times longer). The .prg source code is freely available.