@rabizzzy In the other example, if you'd return the values, you'd see they're not the same as well:
function test_iWeak() public pure returns (uint256 i) {
return i++;
}
function test_iStrong() public pure returns (uint256 i) {
return ++i;
}
returns 0 and 1 respectively.
@rabizzzy function test_Loop() public view returns (uint256 a) {
for(a = 0; a < 10; a++){
}
return ++a;
}
function test_Loop2() public view returns (uint256 a) {
for(a = 0; a < 10; ++a){
}
return a++;
}
@high_byte Still using the optimizer, if I extend it to public views that return the values, the same result... 264 for Strong, 247 for Weak. Trying it with a storage updating function, i++ is also more efficient. 30283 vs 30239. The real tip is to use the optimizer.
@high_byte With optimization enabled at 200 runs on compile and the latest compiler (0.8.19), the results are inverted. 215 gas for Strong, 198 for Weak.
@Krypto_Whale123 @KevinMcmullan17 @kkoncrypto Yeah the restriction is hardcoded for life. Private sale can never sell more than what is set in the contract, ever, per the transparent specifications that were in the docs I read before writing. There isn't even a way for the contract owner to "Turn it off" for the wallets.