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

fix(ssa): Add inc_rc to deref lvalue #8730

Closed
wants to merge 2 commits into from
Closed

Conversation

vezenovm
Copy link
Contributor

@vezenovm vezenovm commented Sep 24, 2024

Benchmark RC correctness issue: noir-lang/noir#6123

@vezenovm vezenovm added the bench-all CI: Enables this CI job. label Sep 24, 2024
@AztecBot
Copy link
Collaborator

AztecBot commented Sep 24, 2024

Benchmark results

Metrics with a significant change:

  • app_circuit_witness_generation_time_in_ms (Token:transfer): 204 (+24%)
  • protocol_circuit_simulation_time_in_ms (private-kernel-tail-to-public): 1,306 (+90%)
Detailed results

All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.

This benchmark source data is available in JSON format on S3 here.

Proof generation

Each column represents the number of threads used in proof generation.

Metric 1 threads 4 threads 16 threads 32 threads 64 threads
proof_construction_time_sha256_ms 5,728 1,538 699 752 768
proof_construction_time_sha256_30_ms 22,705 6,086 2,771 (+1%) 2,806 (+1%) 2,828 (+1%)
proof_construction_time_sha256_100_ms 43,996 11,926 (+2%) 5,393 5,363 (-1%) 5,355
proof_construction_time_poseidon_hash_ms 78.0 34.0 (-19%) 34.0 60.0 (+3%) 88.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,526 418 201 227 (+4%) 264 (-1%)
proof_construction_time_poseidon_hash_100_ms 5,657 1,515 675 732 (-1%) 752 (+1%)

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 4 txs 8 txs 16 txs
l1_rollup_calldata_size_in_bytes 4,612 8,260 15,556
l1_rollup_calldata_gas 52,936 97,732 186,988
l1_rollup_execution_gas 822,526 1,559,344 3,351,751
l2_block_processing_time_in_ms 257 (-1%) 432 (-2%) 807 (-1%)
l2_block_building_time_in_ms 4,590 9,337 (+4%) 17,954 (+1%)
l2_block_rollup_simulation_time_in_ms 4,590 9,337 (+4%) 17,954 (+1%)
l2_block_public_tx_process_time_in_ms 4,566 9,309 (+4%) 17,920 (+1%)

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 8 txs.

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 2,686 (-1%) 3,554 (-2%)
node_database_size_in_bytes 12,415,216 16,392,432
pxe_database_size_in_bytes 16,254 26,813

Circuits stats

Stats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.

Circuit simulation_time_in_ms witness_generation_time_in_ms input_size_in_bytes output_size_in_bytes proving_time_in_ms
private-kernel-init 72.0 (-6%) 388 (-3%) 21,181 44,898 N/A
private-kernel-inner 138 691 (-2%) 72,235 45,020 N/A
private-kernel-reset-tiny 305 (-3%) 675 (-5%) 64,562 44,886 N/A
private-kernel-tail 152 (+1%) 130 (-2%) 50,581 59,239 N/A
public-kernel-setup 51.7 (-1%) N/A 114,697 79,670 N/A
public-kernel-app-logic 53.0 (+2%) N/A 114,697 79,670 N/A
public-kernel-tail 517 (+4%) N/A 487,098 16,414 N/A
private-kernel-reset-small 282 (-2%) N/A 66,345 45,629 N/A
private-kernel-tail-to-public ⚠️ 1,306 (+90%) 600 (-3%) 445,931 1,825 N/A
public-kernel-teardown 52.4 N/A 114,697 79,670 N/A
undefined N/A N/A N/A N/A 101,692 (+4%)

Stats on running time collected for app circuits

Function input_size_in_bytes output_size_in_bytes witness_generation_time_in_ms
ContractClassRegisterer:register 1,344 11,731 349 (+1%)
ContractInstanceDeployer:deploy 1,408 11,731 35.4
MultiCallEntrypoint:entrypoint 1,920 11,731 443 (+1%)
FeeJuice:deploy 1,376 11,731 423 (+1%)
SchnorrAccount:constructor 1,312 11,731 101 (+1%)
SchnorrAccount:entrypoint 2,336 11,731 410 (+1%)
FeeJuice:claim 1,344 11,731 52.1 (-1%)
Token:privately_mint_private_note 1,280 11,731 112 (-4%)
FPC:fee_entrypoint_public 1,344 11,731 69.1 (+23%)
Token:transfer 1,312 11,731 ⚠️ 204 (+24%)
Benchmarking:create_note 1,344 11,731 100
SchnorrAccount:verify_private_authwit 1,280 11,731 26.3 (-2%)
Token:unshield 1,376 11,731 606 (+7%)
FPC:fee_entrypoint_private 1,376 11,731 810 (+5%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 7.10 (+7%) 1,052
FeeJuice:set_portal 7.50 (+8%) 1,070
Token:constructor 197 (+4%) 7,593 (+4%)
FPC:constructor 14.4 (+8%) 5,023 (+6%)
FeeJuice:check_balance 3.43 (+8%) 936
Token:mint_public 8.35 (-5%) 1,942
Token:assert_minter_and_mint 5.07 (+3%) 1,260
AuthRegistry:set_authorized 3.46 (+14%) 464
FPC:prepare_fee 64.5 (+14%) 1,077
Token:transfer_public 9.40 (-5%) 5,719 (+5%)
FPC:pay_refund 35.1 (+3%) 1,494
Benchmarking:increment_balance 10.1 (+3%) 1,432
Token:_increase_public_balance 4.97 (+1%) 1,097
FPC:pay_refund_with_shielded_rebate 41.9 (+1%) 1,383

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.606 (-15%)

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 16 leaves 64 leaves 128 leaves 256 leaves 512 leaves 1024 leaves
batch_insert_into_append_only_tree_16_depth_ms 2.13 (-2%) 3.93 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.8 31.7 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.110 (-2%) 0.110 (-1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 11.1 (-1%) 18.7 31.5 (+1%) 59.6 (+2%) 114 (-1%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 287 543 1,055
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.107 (-1%) 0.109 0.102 0.103 (+2%) 0.102 (-1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.5 (+1%) 25.9 44.4 82.0 164 (+2%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 108 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.111 (+1%) 0.105 (+1%) 0.102 (-5%) 0.102 (+1%) 0.103 (+2%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.6 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 132 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.107 N/A N/A N/A N/A

Miscellaneous

Transaction sizes based on how many contract classes are registered in the tx.

Metric 0 registered classes 1 registered classes
tx_size_in_bytes 72,435 671,025

Transaction size based on fee payment method

| Metric | |
| - | |

@vezenovm
Copy link
Contributor Author

Closing as this is part of #8740

@vezenovm vezenovm closed this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bench-all CI: Enables this CI job.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants