without const-CodeChef: Practical coding for everyone
with const–CodeChef: Practical coding for everyone
anyone plz explain me this?
without const-CodeChef: Practical coding for everyone
with const–CodeChef: Practical coding for everyone
anyone plz explain me this?
I don’t think you understand how much const speeds up execution time. The compiler does some more optimisations if it knows the value won’t be changed.
This is one of my previous submissions
With const declared everywhere possible, like you normally should
Now I removed const, and I get this
Without const
ok got that.It means const makes execution fast.
Thanks.
Google should always be your first priority.
WE ARE NOT HERE TO SEARCH INFORMATION FOR YOU.
In any case, here it is : What kind of optimization does const offer in C/C++? - Stack Overflow