-
Notifications
You must be signed in to change notification settings - Fork 357
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
Memset for distance arrays #51
Comments
That's a good idea, I'll consider it. In any case, the book should mention the memset function. |
GCC will generally convert a zero-initialization loop to a |
Only with -O3, and most judges (for instance codeforces, uva, POI) use -O2, so there's usually an efficiency difference. |
You can just put a |
Calling memset is more efficient and quicker to write, than a loop, to set all values to 0/INF.
What do you think about changing the loops in graph algorithms to memset?
The text was updated successfully, but these errors were encountered: