- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page