Forum : 8051
Original Post
Post Information | Post |
---|---|
May 23, 2007 - 4:45pm
|
Signed 32bit (long) division is the slowest basic calculation for most compilers. However, in RC51 I'm surprised at how much slower it is than other operations. The call C_SLDIV_SP takes typically 2200 machine cycles. That's 100usec on a 22MHz single-cycle 8051. By comparsion 16bit division e.g C_UIDIV, takes roughly 60 cycles. Is the time for C_SLDIV_SP reasonable? For now I have to beware of using it in some signal processing paths. This is the one routine whose optimisation, it that's possible, would help me most. Thanks Steven Pruzina |
if you have a problem with the time it takes to do 32 bit operations, you should not have selected a 8 bit processor.
Erik
Hi Erik
Well... hindsight is always 20:20. Also, Silicon Labs remain a good fit for my application overall. The slow 32bit divide isn't a killer; I'm just asking Raisonance if it is unreasonably long relative to the other arithmetic operations in their library.
Steven
2200 machine cycles. . By comparsion 16bit division e.g C_UIDIV, takes roughly 60 cycles.
well 60 squared is 3600, so 2000 sounds great
Erik