- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Usually it produces faster code, but I already noticed two programs where it results in very slow binaries.One of them is the following compression program.
http://mattmahoney.net/dc/zp100.zip
http://mattmahoney.net/dc/zp100.zip
[plain]openssl rand 1000000 -out random icpc -O3 -xSSE3_ATOM -o zp zp.cpp ./zp c3 random.zp random Elapsed time 20.52 seconds. icpc -O3 -o zp zp.cpp ./zp c3 random.zp random Elapsed time 21.34 seconds. icpc -O3 -xSSE3_ATOM -ipo -o zp zp.cpp ./zp c3 random.zp random Elapsed time 29.74 seconds. icpc -O3 -ipo -o zp zp.cpp ./zp c3 random.zp random Elapsed time 35.08 seconds.[/plain]This is with 11.1.072 and an Intel Atom processor.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try -ip (interprocedural optimization within single file) which is more suitable for the example than -ipo (dto. within multiple files). It gives slightly better performance.
Did you try -ipo also with multiple file compilations?
Hubert.
Did you try -ipo also with multiple file compilations?
Hubert.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, ipo code is slower. I'll have a look at it.
Regards, Hubert.
Regards, Hubert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try -ip (interprocedural optimization within single file) which is more suitable for the example than -ipo (dto. within multiple files). It gives slightly better performance.
Did you try -ipo also with multiple file compilations?
Hubert.
Did you try -ipo also with multiple file compilations?
Hubert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually I have completely ignored that this is only a single source file for some reason. Probably because I automatically try -fast first which then expands into -ipo and other switches. The other example where -ipo produces much slower code is only one source file as well.
Maybe in the case of -fast with only a single source file the compiler could warn about this to help the user?
In cases with multiple files -ipo produces faster code.
Thanks for you reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've tried another single source file, and while -ipo obviously didn't produce faster code it wasn't slower either. So this could still be a bug.

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