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

feat: add benchmark example #109

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

louise-poole
Copy link
Contributor

Sample output:

========== Benchmark Results on 100 swaps ==========

balancer_v2 - Mean Time: 733662.92 ns, Trimmed Mean Time: 691404.57 ns, Max Time: 2006833 ns, Min Time: 543667 ns, Std Dev: 197524.23 ns

Histogram:
  543667 - 689983   | ******************************************************
  689984 - 836300   | ********************************
  836301 - 982617   | ********
  982618 - 1128934  | **
 1128935 - 1275251  | *
 1275252 - 1421568  | *
 1421569 - 1567885  | *
 1567886 - 1714202  | 
 1714203 - 1860519  | 
 1860520 - 2006836  | *

---------------------------------------

curve - Mean Time: 1049883.33 ns, Trimmed Mean Time: 1049883.33 ns, Max Time: 3139791 ns, Min Time: 195916 ns, Std Dev: 694054.37 ns

Histogram:
  195916 - 490303   | *******************************
  490304 - 784691   | ********
  784692 - 1079079  | *******
 1079080 - 1373467  | **********************
 1373468 - 1667855  | ***************
 1667856 - 1962243  | ********
 1962244 - 2256631  | ****
 2256632 - 2551019  | **
 2551020 - 2845407  | *
 2845408 - 3139795  | **

---------------------------------------

uniswap_v2 - Mean Time: 872.96 ns, Trimmed Mean Time: 788.16 ns, Max Time: 4333 ns, Min Time: 625 ns, Std Dev: 434.01 ns

Histogram:
     625 - 995      | *********************************************************************************************
     996 - 1366     | ***
    1367 - 1737     | *
    1738 - 2108     | 
    2109 - 2479     | *
    2480 - 2850     | *
    2851 - 3221     | 
    3222 - 3592     | 
    3593 - 3963     | 
    3964 - 4334     | *

---------------------------------------

uniswap_v3 - Mean Time: 3976.23 ns, Trimmed Mean Time: 2223.01 ns, Max Time: 37416 ns, Min Time: 375 ns, Std Dev: 6028.50 ns

Histogram:
     375 - 4079     | ***************************************************************************************
    4080 - 7784     | ****
    7785 - 11489    | ***
   11490 - 15194    | 
   15195 - 18899    | *
   18900 - 22604    | 
   22605 - 26309    | ***
   26310 - 30014    | 
   30015 - 33719    | *
   33720 - 37424    | *

---------------------------------------

Copy link
Collaborator

@dianacarvalho1 dianacarvalho1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @louise-poole ! 🙏🏼 Only have small comments, the rest looks really good!
Do you want me to run this as well to compare with your results?

examples/benchmark/main.rs Show resolved Hide resolved
examples/benchmark/main.rs Show resolved Hide resolved
examples/benchmark/main.rs Outdated Show resolved Hide resolved
src/evm/protocol/vm/tycho_decoder.rs Outdated Show resolved Hide resolved
examples/benchmark/main.rs Show resolved Hide resolved
@louise-poole louise-poole force-pushed the lp/benchmark-simulations branch from c08ab3a to c3ca030 Compare December 20, 2024 13:21
@louise-poole louise-poole force-pushed the lp/benchmark-simulations branch from 9e71235 to c434376 Compare February 4, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants