please i need some advice on optimization

J

Jason Lang

hi i am using a function which does a floating point "modulus"
operation.

it takes 2 floats as input and wraps the first float (float1) to fit in
the range 0 .. float2

I was originally using a math function fmod but this was really slow so
i replaced it with an inline function i wrote. this was a lot faster,
but still there is room for improvement.

What is the fastest function which performs this operation ?

If i want to write it in assembly, can someone explain to me the syntax
for embedding assmebler in my visual c++ 6 projects ?

Thanks

- Jason
 
M

Mike Wahler

Jason Lang said:
hi i am using a function which does a floating point "modulus"
operation.

it takes 2 floats as input and wraps the first float (float1) to fit in
the range 0 .. float2

I was originally using a math function fmod but this was really slow so
i replaced it with an inline function i wrote. this was a lot faster,
but still there is room for improvement.

What is the fastest function which performs this operation ?

The C++ language makes no requirements about 'speed'. Only
behavior.
If i want to write it in assembly, can someone explain to me the syntax
for embedding assmebler in my visual c++ 6 projects ?

Not here. Ask in a group about Visual C++. You can find one
with google, or by checking at www.msdn.microsoft.com

-Mike
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top