This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Usage: runperf ./my-benchmark-binary | |
| # | |
| # Script to run a benchmark / performance test in decent conditions. Based on: | |
| # - https://www.llvm.org/docs/Benchmarking.html | |
| # - "Performance Analysis and Tuning on Modern CPU" by Denis Bakhvalov, Appendix A. | |
| # - https://github.com/andikleen/pmu-tools | |
| # | |
| # Note that this doesn't do any actual benchmarking, your binary must be able to do that all by itself. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| object "Multicall" { | |
| code { | |
| // Deploy the contract | |
| // Store gas token burn cost in zero slot | |
| sstore(0, 0) | |
| sstore(1, 0) | |
| sstore(2, 0) | |
| datacopy(0x0, dataoffset("MulticallRuntime"), datasize("MulticallRuntime")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fib3(uint n) external pure returns(uint a) { | |
| if (n == 0) { | |
| return 0; | |
| } | |
| uint h = n / 2; | |
| uint mask = 1; | |
| // find highest set bit in n | |
| while(mask <= h) { | |
| mask <<= 1; | |
| } |
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |