CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PCWH 3.241 odd math performance

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
ribblem



Joined: 30 Dec 2005
Posts: 1

View user's profile Send private message

PCWH 3.241 odd math performance
PostPosted: Fri Dec 30, 2005 9:34 pm     Reply with quote

I just got the dev board and compiler so I thought I'd run some simple perf numbers to verify that I'm getting numbers similar to those on page 264 of the "C Compiler Reference Manual". Since the pic18f6722 dev board is only clocked at 20 MHz I expected my performance to be about half as fast as the numbers in the book. Also I'm including a store in my benchmarks so I should be a little slower. I found my numbers agree for int8, int16, and int32. However my float numbers are much faster than the book values. So much so with mul that the float mul is significantly faster than the in32 mul. I didn't take the time to understand the algorithms used for the float math, but I'm wondering if people have run into accuracy problems? Is there a way to force a slower, but more accurate float lib to be used? I didn't do any accuracy testing on the floating point algorithms, but I've never seen a processor without floating point hardware having faster floating point math than integer math while having good accuracy for floats. Let me know if this is the first case of this and I'll be happy (and have to take the time to understand their algorithm).

Here are the results I got from testing performance. The first number is the number of instruction clocks and the second number is microseconds.

Mult
int8 is: 4 1
int16 is: 30 6
int32 is: 228 46
float is: 134 27

Div
int8 is: 97 19
int16 is: 304 61
int32 is: 988 198
float is: 1056 211

Add
int8 is: 3 1
int16 is: 6 1
int32 is: 12 2
float is: 132 26
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group