By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,440 Members | 1,420 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,440 IT Pros & Developers. It's quick & easy.

please i need some advice on optimization

P: n/a
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

Nov 4 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Jason Lang" <ja***********@yahoo.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
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
Nov 4 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.