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

Benchmarks for address-lookup-table program instructions #4406

Conversation

tao-stones
Copy link

Problem

Part of #3364, to benchmark each address-lookup-table instructions to determine their static CU consumption.

Summary of Changes

add benches for each instruction, aiming to run through their happy-path.

Fixes #

@tao-stones
Copy link
Author

local bench results
Running benches/address_lookup_table.rs (target/release/deps/address_lookup_table-972fa07f59235041)
create_lookup_table     time:   [11.539 µs 11.551 µs 11.562 µs]
                        change: [-6.7516% -6.5123% -6.2789%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe

extend_lookup_table     time:   [8.5900 µs 8.6005 µs 8.6130 µs]
                        change: [-2.9621% -2.7085% -2.4662%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

freeze_lookup_table     time:   [6.5421 µs 6.5688 µs 6.5953 µs]
                        change: [-2.2161% -1.8525% -1.4759%] (p = 0.00 < 0.05)
                        Performance has improved.

deactivate_lookup_table time:   [6.6263 µs 6.6394 µs 6.6535 µs]
                        change: [-2.2693% -1.8627% -1.4637%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 8 outliers among 100 measurements (8.00%)
  1 (1.00%) low severe
  5 (5.00%) low mild
  2 (2.00%) high mild

close_lookup_table      time:   [6.5578 µs 6.5719 µs 6.5850 µs]
                        change: [-2.0988% -1.8293% -1.5879%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 8 outliers among 100 measurements (8.00%)
  1 (1.00%) low mild
  7 (7.00%) high mild

@tao-stones tao-stones force-pushed the test-add-address-lookup-table-program-benches branch from 375a00b to dfd070c Compare January 10, 2025 22:48
Copy link

@KirillLykov KirillLykov left a comment

Choose a reason for hiding this comment

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

looks good to me overal

let lookup_table_account = accounts[0].clone();
self.transaction_accounts[0] = (self.lookup_table_address, lookup_table_account);
// advance clock after deactivating
self.transaction_accounts[6] = (

Choose a reason for hiding this comment

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

using numbers to index accounts rather than at least named constant makes it fragile in case of code modifications.

Copy link
Author

Choose a reason for hiding this comment

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

yea agree, thanks for good suggestion! can refactor it separately.

@tao-stones tao-stones merged commit 525ea0c into anza-xyz:master Jan 13, 2025
58 checks passed
@tao-stones tao-stones deleted the test-add-address-lookup-table-program-benches branch January 13, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants