Between incrementing a variable s by doing s = s + 1 OR s++, we first need to accept that the operation in itself is really basic, simple and straightforward. We are basically incrementing a value stored in a variable by a fixed number. Even though s++ will be quicker to execute than s = s + 1, the time difference between these 2 different methods will be the same.
I tried the following code:
int s = 1;
s++;
And it gave the following compilation and execution time:
Compilation time: 0.32 sec, absolute running time: 0.14 sec, cpu time: 0 sec, memory peak: 3 Mb, absolute service time: 0,46 sec
Following that, I tried the code below:
int s = 1;
s = s + 1;
And it gave the following execution time:
Compilation time: 0.32 sec, absolute running time: 0.14 sec, cpu time: 0 sec, memory peak: 3 Mb, absolute service time: 0,46 sec
So, just as I said, there's no significant difference between the 2 operations as they in themselves are quite simple. A time difference does exist; however, the execution time given above was not so specific, meaning that there must be a time difference that is >0.001, Maaking it pretty much negligible. Hope this answers your question.