Skip to content

Commit

Permalink
Gas cost
Browse files Browse the repository at this point in the history
  • Loading branch information
bokkypoobah committed Sep 2, 2018
1 parent 2038299 commit 68ba95b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ Most likely. The aim of this first version is for the conversions to be computed

<br />

### How gas-efficient is this library?

From [Gas Cost](#gas-cost), `timestampToDateTime(…)` has an execution gas cost of 3,101 gas, and `timestampFromDateTime(…)` has an execution gas cost of 2,566 gas.

<br />

<hr />

## Conventions
Expand Down Expand Up @@ -660,6 +666,10 @@ From executing the following function, the transaction gas cost is 24,693

From Remix, the execution gas cost is 3,101 .

From my latest testing with Remix using Solidity 0.4.24:

<kbd><img src="docs/timestampToDateTime.png" /></kbd>

<br />

### `timestampFromDateTime(...)` Gas Cost
Expand All @@ -675,6 +685,10 @@ From executing the following function, the transaction gas cost is 25,054

From Remix, the execution gas cost is 2,566 .

From my latesr testing with Remix using Solidity 0.4.24:

<kbd><img src="docs/timestampFromDateTime.png" /></kbd>

<br />

<hr />
Expand Down
Binary file added docs/timestampFromDateTime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/timestampToDateTime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 68ba95b

Please sign in to comment.