Keil Logo

C51 Version 7 Operation Timings
Large Model

The following benchmarks provide a baseline for the execution speed of code generated by the Keil C51 Compiler. Automated test scripts were used to calculate the minimum, average, and maximum time required for each operation.

Each benchmark lists the number of states and the number of seconds required to perform the operation. The state time represents the actual number of instruction cycles. You may specify the oscillator frequency and the clock divisor (for the instruction clock) to obtain execution times in seconds.

Enter MCU Speed Details
(Default XTAL Frequency: 12MHz)
 
XTAL Frequency: MHz
Instruction Clock Divisor:
 

Unsigned Character Operations

Operation Min Avg Max
unsigned char + 14
2.33 µSecs
14
2.33 µSecs
14
2.33 µSecs
unsigned char - 15
2.50 µSecs
15
2.50 µSecs
15
2.50 µSecs
unsigned char * 19
3.17 µSecs
19
3.17 µSecs
19
3.17 µSecs
unsigned char / 19
3.17 µSecs
19
3.17 µSecs
19
3.17 µSecs
unsigned char % 20
3.33 µSecs
20
3.33 µSecs
20
3.33 µSecs
unsigned char >> 21
3.50 µSecs
51
8.50 µSecs
81
13.50 µSecs
unsigned char << 21
3.50 µSecs
51
8.50 µSecs
81
13.50 µSecs

Signed Character Operations

Operation Min Avg Max
signed char + 14
2.33 µSecs
14
2.33 µSecs
14
2.33 µSecs
signed char - 15
2.50 µSecs
15
2.50 µSecs
15
2.50 µSecs
signed char * 19
3.17 µSecs
19
3.17 µSecs
19
3.17 µSecs
signed char / 31
5.17 µSecs
38
6.33 µSecs
43
7.17 µSecs
signed char % 34
5.67 µSecs
41
6.83 µSecs
46
7.67 µSecs
signed char >> 21
3.50 µSecs
51
8.50 µSecs
81
13.50 µSecs
signed char << 21
3.50 µSecs
51
8.50 µSecs
81
13.50 µSecs
cabs () 22
3.67 µSecs
23
3.83 µSecs
24
4.00 µSecs

Unsigned Integer Operations

Operation Min Avg Max
unsigned int + 30
5.00 µSecs
30
5.00 µSecs
30
5.00 µSecs
unsigned int - 31
5.17 µSecs
31
5.17 µSecs
31
5.17 µSecs
unsigned int * 60
10.00 µSecs
60
10.00 µSecs
60
10.00 µSecs
unsigned int / 180
30.00 µSecs
183
30.50 µSecs
210
35.00 µSecs
unsigned int % 180
30.00 µSecs
183
30.50 µSecs
210
35.00 µSecs
unsigned int >> 36
6.00 µSecs
88
14.67 µSecs
141
23.50 µSecs
unsigned int << 36
6.00 µSecs
88
14.67 µSecs
141
23.50 µSecs

Signed Integer Operations

Operation Min Avg Max
signed int + 30
5.00 µSecs
30
5.00 µSecs
30
5.00 µSecs
signed int - 31
5.17 µSecs
31
5.17 µSecs
31
5.17 µSecs
signed int * 60
10.00 µSecs
60
10.00 µSecs
60
10.00 µSecs
signed int / 61
10.17 µSecs
212
35.33 µSecs
247
41.17 µSecs
signed int % 61
10.17 µSecs
212
35.33 µSecs
247
41.17 µSecs
signed int >> 36
6.00 µSecs
88
14.67 µSecs
141
23.50 µSecs
signed int << 36
6.00 µSecs
88
14.67 µSecs
141
23.50 µSecs
abs () 32
5.33 µSecs
34
5.67 µSecs
37
6.17 µSecs

Unsigned Long Operations

Operation Min Avg Max
unsigned long + 74
12.33 µSecs
74
12.33 µSecs
74
12.33 µSecs
unsigned long - 75
12.50 µSecs
75
12.50 µSecs
75
12.50 µSecs
unsigned long * 172
28.67 µSecs
172
28.67 µSecs
172
28.67 µSecs
unsigned long / 293
48.83 µSecs
300
50.00 µSecs
359
59.83 µSecs
unsigned long % 301
50.17 µSecs
308
51.33 µSecs
367
61.17 µSecs
unsigned long >> 64
10.67 µSecs
296
49.33 µSecs
529
88.17 µSecs
unsigned long << 64
10.67 µSecs
296
49.33 µSecs
529
88.17 µSecs

Signed Long Operations

Operation Min Avg Max
signed long + 74
12.33 µSecs
74
12.33 µSecs
74
12.33 µSecs
signed long - 75
12.50 µSecs
75
12.50 µSecs
75
12.50 µSecs
signed long * 172
28.67 µSecs
172
28.67 µSecs
172
28.67 µSecs
signed long / 306
51.00 µSecs
346
57.67 µSecs
658
109.67 µSecs
signed long % 314
52.33 µSecs
354
59.00 µSecs
666
111.00 µSecs
signed long >> 64
10.67 µSecs
296
49.33 µSecs
529
88.17 µSecs
signed long << 64
10.67 µSecs
296
49.33 µSecs
529
88.17 µSecs
labs () 98
16.33 µSecs
115
19.17 µSecs
133
22.17 µSecs

Floating-Point Operations

Operation Min Avg Max
float + 192
32.00 µSecs
239
39.83 µSecs
405
67.50 µSecs
float - 176
29.33 µSecs
241
40.17 µSecs
374
62.33 µSecs
float * 159
26.50 µSecs
259
43.17 µSecs
271
45.17 µSecs
float / 699
116.50 µSecs
935
155.83 µSecs
1,114
185.67 µSecs
fmod () 430
71.67 µSecs
2,253
375.50 µSecs
4,157
692.83 µSecs
modf () 1,687
281.17 µSecs
2,179
363.17 µSecs
2,347
391.17 µSecs
fabs () 56
9.33 µSecs
57
9.50 µSecs
59
9.83 µSecs
ceil () 1,282
213.67 µSecs
1,745
290.83 µSecs
1,976
329.33 µSecs
floor () 1,282
213.67 µSecs
1,744
290.67 µSecs
1,991
331.83 µSecs
pow () 994
165.67 µSecs
3,929
654.83 µSecs
10,579
1,763.17 µSecs
sqrt () 63
10.50 µSecs
1,173
195.50 µSecs
2,436
406.00 µSecs
exp () 274
45.67 µSecs
306
51.00 µSecs
4,507
751.17 µSecs
log () 68
11.33 µSecs
2,082
347.00 µSecs
4,346
724.33 µSecs
log10 () 70
11.67 µSecs
2,182
363.67 µSecs
4,546
757.67 µSecs
sin () 704
117.33 µSecs
3,326
554.33 µSecs
3,787
631.17 µSecs
cos () 627
104.50 µSecs
3,328
554.67 µSecs
3,767
627.83 µSecs
tan () 4,357
726.17 µSecs
4,724
787.33 µSecs
4,904
817.33 µSecs
asin () 374
62.33 µSecs
7,328
1,221.33 µSecs
8,733
1,455.50 µSecs
acos () 874
145.67 µSecs
7,900
1,316.67 µSecs
8,902
1,483.67 µSecs
atan () 1,608
268.00 µSecs
4,408
734.67 µSecs
5,379
896.50 µSecs
atan2 () 1,982
330.33 µSecs
5,224
870.67 µSecs
6,716
1,119.33 µSecs
sinh () 2,878
479.67 µSecs
10,849
1,808.17 µSecs
11,829
1,971.50 µSecs
cosh () 2,924
487.33 µSecs
10,834
1,805.67 µSecs
11,812
1,968.67 µSecs
tanh () 10,403
1,733.83 µSecs
11,058
1,843.00 µSecs
12,932
2,155.33 µSecs

Buffer Operations

Operation Min Avg Max
memset (10) 87
14.50 µSecs
87
14.50 µSecs
87
14.50 µSecs
memset (100) 627
104.50 µSecs
627
104.50 µSecs
627
104.50 µSecs
memset (1000) 6,033
1,005.50 µSecs
6,033
1,005.50 µSecs
6,033
1,005.50 µSecs
memcpy (10) 280
46.67 µSecs
280
46.67 µSecs
280
46.67 µSecs
memcpy (100) 2,260
376.67 µSecs
2,260
376.67 µSecs
2,260
376.67 µSecs
memcpy (1000) 22,066
3,677.67 µSecs
22,066
3,677.67 µSecs
22,066
3,677.67 µSecs
memmove
(10 with overlap)
289
48.17 µSecs
289
48.17 µSecs
289
48.17 µSecs
memmove
(100 with overlap)
2,269
378.17 µSecs
2,269
378.17 µSecs
2,269
378.17 µSecs
memmove
(1000 with overlap)
22,075
3,679.17 µSecs
22,075
3,679.17 µSecs
22,075
3,679.17 µSecs

Memory Allocation Operations

Operation Min Avg Max
malloc (),
99.3% successful
176
29.33 µSecs
764
127.33 µSecs
1,727
287.83 µSecs
free () 251
41.83 µSecs
940
156.67 µSecs
1,890
315.00 µSecs

Notes Note

  • These tests were performed and measured using the µVision Debugger. Test code was compiled with the C51 Version 7.20 C Compiler using the Large Memory Model, ROM(Large), and Optimization Level 8-SPEED.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.