Skip to content

[SYCL][PI][L0] Changes std:string to const char * for ZeCallCount #4018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2021

Conversation

kbsmith-intel
Copy link
Contributor

This changes to use plain const char * for the ZeCallCount map
rather than std:string. This saves std:string construction
and destruction overhead when ZE_DEBUG=4 is being used. It also
saves about 2% code size for the shared library due to this
overhead being removed.

This change should not result in any noticeable change in the
plug-ins behavior.

This changes to use plain const char * for the ZeCallCount map
rather than std:string.  This saves std:string construction
and destruction overhead when ZE_DEBUG=4 is being used. It also
saves about 2% code size for the shared library due to this
overhead being removed.

This change should not result in any noticeable change in the
plug-ins behavior.
Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Out of curiosity why do you optimize the debug execution?

@kbsmith-intel
Copy link
Contributor Author

LGTM. Out of curiosity why do you optimize the debug execution?

Because I noticed that is was causing extra overhead, the same as other places, and it made sense to me to do this consistently. Plus it decreases the chances of later developers copying the inefficient code, and thinking that it is good.

@bader bader merged commit fb97d21 into intel:sycl Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants