-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Update default gas costs based on 0.35.0 benchmarks #2153
Changes from 12 commits
b8397fe
a5eb66d
03016f4
563bc2f
b30a0df
3dcbdb1
8ac1599
cd0f5ab
a26d6cd
e9e2cdd
f192066
1562de8
71beb30
b95a57d
91b1d9d
4bf2af6
5671ad0
87dc4c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,13 @@ use criterion::{ | |
Throughput, | ||
}; | ||
use fuel_core_benches::*; | ||
use fuel_core_types::fuel_asm::*; | ||
use fuel_core_types::{ | ||
fuel_asm::*, | ||
fuel_vm::{ | ||
consts::MEM_SIZE, | ||
interpreter::MemoryInstance, | ||
}, | ||
}; | ||
|
||
pub fn run(c: &mut Criterion) { | ||
run_group_ref( | ||
|
@@ -60,8 +66,11 @@ pub fn run(c: &mut Criterion) { | |
cfe_linear.push(30_000_000); | ||
cfe_linear.push(60_000_000); | ||
for i in cfe_linear { | ||
let bench = | ||
VmBench::new(op::cfe(0x10)).with_prepare_script(set_full_word(0x10, i)); | ||
let prepare_script = set_full_word(0x10, i); | ||
let memory = MemoryInstance::from(vec![123; MEM_SIZE]); | ||
let bench = VmBench::new(op::cfe(0x10)) | ||
.with_prepare_script(prepare_script) | ||
.with_memory(memory); | ||
cfe.throughput(Throughput::Bytes(i)); | ||
run_group_ref(&mut cfe, format!("{i}"), bench); | ||
} | ||
|
@@ -77,7 +86,8 @@ pub fn run(c: &mut Criterion) { | |
cfei_linear.push(1_000_000); | ||
cfei_linear.push(10_000_000); | ||
for i in cfei_linear { | ||
let bench = VmBench::new(op::cfei(i as u32)); | ||
let memory = MemoryInstance::from(vec![123; MEM_SIZE]); | ||
rafal-ch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
let bench = VmBench::new(op::cfei(i as u32)).with_memory(memory); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did we need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just added it to remove any potential optimizations related to zeroed memory. Now all benchmarks use non zeroed memory |
||
cfei.throughput(Throughput::Bytes(i)); | ||
run_group_ref(&mut cfei, format!("{i}"), bench); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How were we getting the values for
bldd
andbsiz
before? It looks like they didn't exist before.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had a task to add benchamrks for these upcodes: #2049
Before we just copied values from similar contract opcodes