English
Language : 

AN910 Datasheet, PDF (43/51 Pages) STMicroelectronics – ST7 AND ST9 PERFORMANCE BENCHMARKING
ST7 AND ST9 PERFORMANCE BENCHMARKING
8 DESCRIPTION OF THE TEST ROUTINES
This section is a more precise description of the test routines. For each test, are detailed the
algorithm, its implementation and the features which it stresses.
8.1 ERATOSTHENES SIEVE
Algorithm
The Eratosthenes sieve is a well-known algorithm which searches the prime numbers greater
than or equal 3 out of n elements (n=8189 has been chosen arbitrary).
Implementation
The even numbers greater than 3 are not prime numbers, so that this algorithm only looks for
prime numbers among an array of odd numbers.
We have chosen an array of 8189 elements. It represents the odd numbers from 3 to 16379. The
array is initialized with the value 'true' ('true' = 0), and is then filled with 1 (false) if the
corresponding number is not a prime number or is not modified (it keeps the value 0='true') if it
is a prime number. Don't forget that it is an array of odd numbers: array[j] ↔ 2j+3
At the beginning of the routine, each number is a potential prime number (initialization value is
'true'). The algorithm consists in setting (to 'false') the odd multiples of every prime number found
in the array skimmed through in the ascending order.
Features stressed
This test measures the elementary computational capability and the ability to manipulate
data in an array.
8.2 ACKERMANN FUNCTION
Algorithm
Implementation
Features stressed
The Ackermann function is a two parameter function -acker(m,n)- which induces several
recursive calls.
This test routine is performed with two different pairs of parameters: acker(3,5) and acker(3,6).
For instance, with the parameters m=3 and n=6, the function induces 172, 233 procedure calls.
It tests the efficiency in recursive procedure calls and in stacks usage.
8.3 STRING SEARCH
Algorithm
The String search consists in searching a 16-byte string in a 128-character array.
Implementation
The data are predefined with the following contents:
for the 128-character array,
“xxxxxxxxpatterxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” (64 bytes)
“xxxxxxxxxxxxxxxxxpattern is here!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” (64 bytes)
and for the 16-byte string,
“pattern is here!” (16 bytes)
The searching algorithm looks for the first matching character in the array and then compares
the rest of the string. If the searched string has been found, it returns the address of the first
character of the string in the array.
Features stressed This program measures the efficiency in data comparison and string manipulation.
43/51