- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to inline C library string functions like strcpy and strcmp? I'm assuming ICC does have inline-able versions of these functions?
Thanks.
Thanks.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jpburke
Is there a way to inline C library string functions like strcpy and strcmp? I'm assuming ICC does have inline-able versions of these functions?
In libirc, you will find sse2 and sse4 versions of strcpy(); unlike memcpy(), the function isn't amenable to in-lining, even for specific short constant string lengths, although you are welcome to supply your own source code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiler will decide what's best to use in the code. Different places may use different strcpy. It depends on the length of the string, and there're many versions of strcpy/strcmp etc.
So just try different options, and see which one gives you the best performance on your targeted system.
Jennifer
So just try different options, and see which one gives you the best performance on your targeted system.
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Jennifer Jiang (Intel)
Compiler will decide what's best to use in the code. Different places may use different strcpy. It depends on the length of the string, and there're many versions of strcpy/strcmp etc.
So just try different options, and see which one gives you the best performance on your targeted system.
Jennifer
So just try different options, and see which one gives you the best performance on your targeted system.
Jennifer
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jpburke
Is there a compiler option that will output which function calls have been replaced with intrinic functions?
Thanks
Thanks
There is no such documented option.
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