embench / embench-iot

The main Embench repository
https://www.embench.org/
GNU General Public License v3.0
254 stars 104 forks source link

Add primecount test. #142

Closed PaoloS02 closed 3 years ago

PaoloS02 commented 3 years ago

The test primecount searches and counts the prime numbers up to a given limit. This version of the test is a reduction of the test proposed by Bruce Hoult. The limit has been reduced in order to fit the execution time on a Cortex M4 working at 16 MHz into 4 seconds.

Files changed:

* src/primecount/primecount.c: Created.
* baseline-data/size.json: Added the result for primecount.
* baseline-data/speed.json: Likewise.

Thanks to Bruce Hoult bruce@hoult.org for providing the test.

Roger-Shepherd commented 3 years ago

This works when I add in to the tests I can run on M1 Mac. I'm not sure of the significance of the size/time numbers in the benchmark source. They don't seem to align with the figures I get for M1.

PaoloS02 commented 3 years ago

Thanks @Roger-Shepherd I guess you set the value of SZ as 1000 to check that, right? It could make sense to remove the results in the comments or to comment as a "broad reference" as they were not obtained in the embench infrastructure. It would be pretty demanding to collect the binaries that achieve those numbers and compare in order to understand how the size measurement was made for those. same for the execution time.

Roger-Shepherd commented 3 years ago

Thanks @Roger-Shepherd I guess you set the value of SZ as 1000 to check that, right?

No!

It could make sense to remove the results in the comments or to comment as a "broad reference" as they were not obtained in the embench infrastructure. It would be pretty demanding to collect the binaries that achieve those numbers and compare in order to understand how the size measurement was made for those. same for the execution time.

Yes. Certainly something saying they aren't comparable because (i) SZ, (ii) methodology

PaoloS02 commented 3 years ago

I will clarify that in the comment then. Thanks for the update

PaoloS02 commented 3 years ago

I added a comment that clarifies this. Ready to merge.

jeremybennett commented 3 years ago

Good to merge.