Skip to content

Instantly share code, notes, and snippets.

View devinaconley's full-sized avatar

Devin A. Conley devinaconley

View GitHub Profile
@hrkrshnn
hrkrshnn / generic.org
Last active April 21, 2024 01:51
Some generic writeup about common gas optimizations, etc.

Upgrade to at least 0.8.4

Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!

The advantages of versions 0.8.* over <0.8.0 are:

  • Safemath by default from 0.8.0 (can be more gas efficient than some library based safemath).
  • Low level inliner from 0.8.2, leads to cheaper runtime gas. Especially relevant when the contract has small functions. For
@d-day
d-day / refactor.pde
Last active December 27, 2016 01:25
Large refactor with demonstration of problem and inefficieny
/*
===========================================================================================
ArduinoPlotter_processingListener is the source processing script that corresponds to the
Plotter library for Arduino. The library supports plots against time as well as 2-variable
"X vs Y" graphing.
-------------------------------------------------------------------------------------------
The library transfers information via the serial port to a listener program written with the
software provided by Processing. No modification is needed to this program; graph placement,
axis-scaling, etc. are handled automatically.
Multiple options for this listener are available including stand-alone applications as well