$i++
The form $i` creates a temporary variable whereas `$i does not. It save CPU cycles.
$i++
++$i
Energy: measured in joules (J)
Transfer: measured in Bytes (B)
Storage: measured in Bytes (B)
The control of these 3 impacts allows to lengthen the life of the terminals as well as reduce their energy consumption.
The ETSdiff tool allows measuring a differential on these three values and in a given context (database and fixed measurement environment).
The results generated by ETSdiff must help define the interest of the rule reported by SonarQube in the context of the code analyzed.
| Source of impacts | Compliant | Non-compliant |
|---|---|---|
Energy (J) |
1.8163645000000002 |
0.2613885000000001 |
Transfer (B) |
11265758 |
11290494 |
Storage (B) |
637548673 |
637548673 |