Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Favor use of the gas opcode over not(0) #8

Closed
GNSPS opened this issue Feb 18, 2018 · 1 comment
Closed

Favor use of the gas opcode over not(0) #8

GNSPS opened this issue Feb 18, 2018 · 1 comment
Assignees

Comments

@GNSPS
Copy link

GNSPS commented Feb 18, 2018

In the Proxy and the Proxy factory contracts, more specifically in the calls each of these make here:

https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/Proxy.sol#L27
https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/ProxyFactory.sol#L21

Consider using the gas opcode (which is obviously only one instruction) over the current not(0) choice. It behaves exactly the same, compiles down to 1 vs 3 instructions and uses less gas.

@Georgi87
Copy link
Contributor

Great, thanks! This will be changed.

@rmeissner rmeissner self-assigned this May 7, 2018
@rmeissner rmeissner mentioned this issue May 7, 2018
11 tasks
fdarian pushed a commit to fdarian/safe-contracts that referenced this issue Jan 14, 2024
Add Contributor License Agreement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants