Faster arithmetic operations

Faster arithmetic operations

hi
i am making an application that includes lotz of shift and other logical operations.These operations are performed on integers and shorts.
Which Library should i be using to make these oeprations faster.I guess MKL deals with only vector arithmetics.plz give tips on where to start.
bbye

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Scalar shifts and the like are compiled in line by your compiler. A library function call would take longer than any reasonable compiler generated code. The main thing to watch is that you specify the architecture you want to optimize; for example, if you specify 'gcc -march=pentium4', the compiler will know about the P4 preference for a sequence of adds over a left shift or multiply.
Another thing to watch is that you don't force unnecessary conversions between short int and int data types, and don't over-use short int.
Only a vector library offers enough advantage for special instructions, to overcome the overhead of function calls.

Login to leave a comment.