Dinfio Benchmarks

← Back to Homepage





Dinfio 3.1.04 vs Dinfio 3.1.03

The benchmark is done by running the following codes:

System: MacBook Air Early 2015, Core i5-5250U 1.6 GHz Dual Core, 8 GB DDR3 RAM, macOS 11.2.

The result (find nth prime number using Sieve of Eratosthenes):


Max Size Running Time (s)
Dinfio 3.1.04
Running Time (s)
Dinfio 3.1.03
Memory Usage (MB)
Dinfio 3.1.04
Memory Usage (MB)
Dinfio 3.1.03
10k0.0050.0111.21.9
100k0.0320.148.914.5
1M0.341.8682.9141.3


The result (linear search):


Total Data Running Time (s)
Dinfio 3.1.04
Running Time (s)
Dinfio 3.1.03
Memory Usage (MB)
Dinfio 3.1.04
Memory Usage (MB)
Dinfio 3.1.03
10k0.0110.0130.74.4
100k0.0810.1247.943.9
1M0.7861.50578.3437.2


Code (find nth prime number using Sieve of Eratosthenes):

' nth Prime Number using Sieve of Eratosthenes
 
start
    max_size = 1000000
    nth = 10
    primes = []
    is_prime = []
 
    sieve_of_eratosthenes()
 
    writeln(nth & "th prime number is " & primes[nth - 1])
stop
 
function sieve_of_eratosthenes()
    for i, 0, max_size
        is_prime[i] = true
    endfor
 
    p = 2
 
    while p * p < max_size
        if is_prime[p]
            for i, p * p, max_size - 1, p
                is_prime[i] = false
            endfor
        endif
 
        p += 1
    endwhile
 
    for p, 2, max_size - 1
        if is_prime[p]
            append(primes, p)
        endif
    endfor
stop

Code (linear search):

' Linear search
 
import fileio
 
data = []
key = "1000000"
found = false
 
 
' Read data from file
 
f = file("data-" & key & ".txt", file_read)
 
while !f.eof()
    append(data, f.readln())
endwhile
 
 
' Search the key
 
for i, 0, size(data) - 1
    if key == data[i]
        found = true
        break
    endif
endfor
 
writeln(found)

Data: linear-search-data.zip.

Dinfio 3.1.01 vs Dinfio 3.1.0

The benchmark is done by running a linear search with total data: 1.000, 10.000, 100.000, and 1.000.000. The key is located at the end of the data.

System: MacBook Air Early 2015, Core i5-5250U 1.6 GHz Dual Core, 8 GB DDR3 RAM, macOS 10.14.5.

The result:

Total Data Running Time (s)
Dinfio 3.1.01
Running Time (s)
Dinfio 3.1.0
1k0.0050.011
10k0.0190.053
100k0.1950.521
1M2.2315.544

Code:

import fileio
 
data = []
key = "1000000"
found = false
 
 
' Read data from file
 
f = file("data-" & key & ".txt", file_read)
 
while !f.eof()
    append(data, f.readln())
endwhile
 
 
' Search the key
 
for i, 0, size(data) - 1
    if key == data[i]
        found = true
        break
    endif
endfor
 
writeln(found)

Data: linear-search-data.zip.

Dinfio 3.1.0 vs Dinfio 3.0.12

The benchmark is done by running a loop of variable assignment 1.000.000, 10.000.000, and 100.000.000 times. Performance is compared to Dinfio 3.0.12.

System: Core i7-8565U 1.8 GHz Quad Core, 8 GB DDR4 RAM, Windows 10.

The result:

Loop Times Running Time (s)
Dinfio 3.1.0
Running Time (s)
Dinfio 3.0.12
1M0.0310.82
10M0.284.16
100M2.6728.82

Code 1:

n = 1000000
 
for i, 1, n
    a = i
endfor

Code 2:

n = 10000000
 
for i, 1, n
    a = i
endfor

Code 3:

n = 100000000
 
for i, 1, n
    a = i
endfor