- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why the performance is so low when using pointer checker?
There two two compiler parameters:
1. CFLAGS= -O0 -check-pointers:rw
2. CFLAGS= -O0
Questions:
1. why the former is five fast than the second?
2. how does the pointer checker work? Check on every buf or only check on buf[16]
char *buf = malloc(16); for (int i=0; i<=16; i++) { buf = ‘A’ + i; }
3. when I change the "for loop" using SIMD and width of 4, how many times does the point cheker do check?
- Tags:
- CC++
- Development Tools
- General Support
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
1. Pointer checker adds overhead in terms of the size and execution time of a program. Hence, the performance is low because the execution time is high. Ideally, pointer checker is designed for use only during application testing and debugging and not during deployment.
For questions 2 and 3, we need to check with the Subject Matter Experts(SMEs) and we'll get back to you at the earliest.
--Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To answer your curiosity, place a debugger break point on the line of interest and then at break, open a Dissassembly view.
Or when compiling, choose to output: Assembly with Source Code (/FAs). Do this (to different files) for with and without pointer check.
Then compare both outputs.
The VTune data will also show what and where things are going on (in Dissassembly window).
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When memory is allocated for that pointer, its upper and lower bound will be saved in a "bound table". Every time you access it, it will be checked against upper and lower bounds. So, #2 should be buf and #3 should be 4 times fewer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let us know if this is still an issue. Otherwise, we will close it.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We will no longer respond to this thread.
If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.
Thank

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page