Floating point with and without uM-FPU
diafysal
Posts: 92
Hi
I wonder about the "speed" of the uM-FPU Floating Point Coprocessor, haven’t really seen anything about that. I suppose that for example that Sin, Cosin, Tan and Sqrt is faster with the uM-FPU. But the data has to be transferred to and from the uM-FPU. And as I said, I haven’t seen anything about the "speed"(I might have looked in the wrong place).
Opinions anyone ? (or facts)
Comments
external floating-point chip, but how is data transferred?)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
http://www.parallax.com/dl/docs/trdprty/UMFPUJavelinStamp.pdf
regards peter
·
Cool.
Al Williams
AWC
·
Java code only.
Micromega, Math coprocessor (uM-FPU)
AWC, Math coprocessor.
And probably more. It would be nice to see a comparison.
I assume that when you wonder whether "Sin, Cosin, Tan and Sqrt is faster with the uM-FPU" you mean in comparison to the Float32/Float32Math classes. There is an overhead for communication with the uM-FPU, but this is small in comparison to the overhead required to do floating point in Java (as Float32) does. Using the uM-FPU requires much less code space and results in significantly faster execution. Comparison are as follows:
uM-FPU vs Float32/Float32Math
Add, Subtract: up to 7 times faster
Multiply: up to 40 times faster
Divide: up to 70 times faster
Sqrt: up to 55 times faster
Sin, Cos: up to 90 times faster
Tan: up to 120 times faster
Exp: up to 90 times faster
You can see that there is a significant speed improvement using the uM-FPU. One of the nice things about the uM-FPU Java class is that it is a drop in replacement for Float32/Float32Math. In most cases all you need to do is change the import statement to point to the uM-FPU clases. The chip inself is an 8-pin DIP, making it easy to add to a project.
You can find additional information, including instruction timing at:
http://www.micromegacorp.com/downloads.html
Regards,
Cam Thompson
Micromega Corporation