Difference between revisions of "NU32v2: Benchmark Test"

From Mech
Jump to navigationJump to search
Line 6: Line 6:


== Details ==
== Details ==
The common arithmetic operators, multiplication (*), division(/), addition (+), and subtraction (-) were tested on the PIC32. Because timing results can vary depending on which C data type (char, short, int, long long, float, and double) is used, the final table includes the number of cycles a particular operator and data type pair took to compute.
The common arithmetic operators, multiplication (*), division(/), addition (+), and subtraction (-) were tested on the PIC32. Because timing results can vary depending on which C data type (char, short, int, long long, float, and double) is used, the final table includes the number of cycles a particular operator and data type pair took to compute. The table below is taken from a student who took ME 333 in the Winter 2011 term. The values are representative of what the class got as a whole.


{| border="1" align="center" style="text-align:center;"
{| border="1" align="center" style="text-align:center;"

Revision as of 11:30, 21 February 2011

*** UNDER CONSTRUCTION ***

Benchmarking is a useful tool in testing how fast a processor can run. With the PIC32, we are primarily interested in seeing how fast its CPU can perform mathematical operations.

Overview

Details

The common arithmetic operators, multiplication (*), division(/), addition (+), and subtraction (-) were tested on the PIC32. Because timing results can vary depending on which C data type (char, short, int, long long, float, and double) is used, the final table includes the number of cycles a particular operator and data type pair took to compute. The table below is taken from a student who took ME 333 in the Winter 2011 term. The values are representative of what the class got as a whole.

char short int long long float double
add (+) 5 5 5 12 68 102
sub (-) 5 5 5 10 79 123
mult (*) 7 7 7 23 56 106
div (/) 16 16 16 119 149 314


A small subset of the built-in mathematical functions defined in <math.h> were also tested.

Library Functions

Sample Code

More Information