Shop OBEX P1 Docs P2 Docs Learn Events
floating point performance — Parallax Forums

floating point performance

silic0resilic0re Posts: 2
edited 2007-03-12 02:05 in Propeller 1
Hi there,

I have been looking for some information on how the propeller performs on arithmetic functions, specifically multiplication and division (both integer and floating point).· Would anyone happen to know·how many propeller instructions it typically takes to implement these functions?

I'm trying to compare a single propeller COG with a dsPIC30F3012 for performance in mathematical situations.· From what I understand it typically takes the dsPIC30F series 100 (assembly) instructions to emulate a floating point multiplication.

Thanks,
silic0re

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-11 22:52
    Integer multiplication and division are done by subroutine. There is a document called "Propeller Guts" that has various examples including a multiply and divide routine that you can look at for timing. Search the Parallax website for it. The documentation that comes with the Floating Point library gives the timing for each floating point operation (from the Propeller Object Exchange ... See the main Propeller page for a link).
  • silic0resilic0re Posts: 2
    edited 2007-03-12 01:49
    thanks for pointing me to the floating point library.

    it looks as though its best-case execution time is about 10usec (I'm assuming the figures quoted in the documentation are for a propeller thats clocked at its maximum rated frequency), and using two of the cogs. Thats about 100,000 multiplications per second, which is about half as slow as a dsPIC30F3012 at 20MIPS.

    thanks
    silic0re
  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-12 02:05
    1) The Propeller can be clocked about 20% faster. FTDI in fact sells a product at this speed (system clock = 96MHz).

    2) If your application is suitable for it, you can easily run two copies of the floating point library in parallel to double the throughput.
Sign In or Register to comment.