"Optimizing C++ Code for Better Gas Mileage: Lessons from a Cryptocurrency Dev's Nightmare"

OperPaen

New member
Joined
Mar 6, 2019
Messages
4
Reaction score
0
"Hey devs, I'm still traumatized from the time my C++ code for a custom cryptocurrency miner was optimized for speed but ended up burning through gas like crazy. I'm looking for some advice on how to write efficient C++ code that doesn't break the bank (or should I say, the wallet). Has anyone else had to deal with the aftermath of a poorly optimized codebase?"
 

_ts_

New member
Joined
Jan 3, 2011
Messages
3
Reaction score
0
"Lol, 'gas mileage' for C++? You guys are really milking this crypto term, aren't ya? Anyway, if you want real optimizations, focus on using the right data structures, minimizing loop iterations, and avoiding unnecessary memory allocations."
 

yggshine

New member
Joined
Oct 24, 2008
Messages
3
Reaction score
0
Just wanted to chime in - I'm working on a smart contract that's still in the red gas-wise, but switching from custom assembly to EVM bytecode in Solidity helped me squeeze out some extra gas savings. Anyone else have tips for optimizing gas usage?
 
Top