A program to test efficiency of emulated FPU

T

tomekwr

Hi,

I had to write a class which would emulate FPU using normal fixed point
operations, and to test it in some real application. I thought about
some encoding programs but I don't have much idea, which one would be
suitable. I mean that 1. it would use FPU a lot - to be able to see
some difference in time, 2. it would be relatively easy to change the
source code to accept my class (which is written in C++). If you've got
any idea, please help, I would really appreciate it.

Thanks in advance
Tomek W.

(this was posted to comp.compression, too)
 
K

kwikius

Hi,

I had to write a class which would emulate FPU using normal fixed point
operations, and to test it in some real application. I thought about
some encoding programs but I don't have much idea, which one would be
suitable. I mean that 1. it would use FPU a lot - to be able to see
some difference in time, 2. it would be relatively easy to change the
source code to accept my class (which is written in C++). If you've got
any idea, please help, I would really appreciate it.

Thanks in advance
Tomek W.

Hows about applying some transform matrices to sets of points templated
on your fixed point types, versus floats, doubles etc.

regards
Andy Little
 
?

=?iso-8859-1?q?Erik_Wikstr=F6m?=

Hi,

I had to write a class which would emulate FPU using normal fixed point
operations, and to test it in some real application. I thought about
some encoding programs but I don't have much idea, which one would be
suitable. I mean that 1. it would use FPU a lot - to be able to see
some difference in time, 2. it would be relatively easy to change the
source code to accept my class (which is written in C++). If you've got
any idea, please help, I would really appreciate it.

It might be of interest to compare different kinds of operations, for
example + and - are usually quite fast (talking float/double here)
while * and / can take some time. So perhaps you can start of by
creating some synthetic benchmarks, use some random routine to produce
a list of say 1000 FP numbers, for each of them create a double version
and a yourtype version and put them in an array. Then comes the
benchmark: first measure the time it takes to perform some operation
(summing) the doubles then measure the time needed to do the same
operation on your types.

If you want more realistic benchmarks try finding an algorithm for
solving systems of linear equations and implement it. Use a typedef for
the type used in the calculations so you can easily switch (given that
yourtype have similar interface as float/double) and then download a
matrix from the next and try to solve the system (it's a O(n^3)
operation for simple algorithms). I'd recommend a matrix of size
somewhere between 500x500 to 5000x5000, it's better to run the test
many times than taking a too large matrix.
 
T

tomekwr

Thank you for your answers very much, but my problem is that I have to
link it wit some real application, which does some real task, like
encoding something, and I'm looking for one, that'd be suitable for
that. Sorry, maybe the post was a lil offtopic.

Thanks!
Tomek W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top