-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(benchmarks): add benchmarks for niop opcode in all operation modes #3050
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
base: master
Are you sure you want to change the base?
Conversation
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.
s there somewhere I can read up on what niop
is? I've been out of the loop on it.
edit: The description helps haha:
A new niop benchmarking group was added to evaluate the performance of narrow integer operations (niop) with different operand widths (U8, U16, U32).
Still unfamiliar with what it's for, but this helps me approximate :)
benches/benches/vm_set/alu.rs
Outdated
@@ -201,6 +201,77 @@ pub fn run(c: &mut Criterion) { | |||
.with_prepare_script(vec![op::movi(0x11, 100000)]), | |||
); | |||
|
|||
{ | |||
let mut niop = c.benchmark_group("niop"); |
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.
nit: I think this would be more readable as niop_benchmark_group
. It's confusing passing niop
to something named niop_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.
addressed in ee93d38
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.
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.
Hmm, how we convert results of these benchmark into the actual cost? Because we have only one gas cost which we need to fill, but we have 18 benchmarks for it. I see how we can use it in sanity checks, but I don't understand how does it work for the collect
binary=D
checking |
the collect binary groups benchmark groups and takes the average from them i believe. fuel-core/benches/src/bin/collect.rs Lines 588 to 605 in ee93d38
|
This pull request introduces a new benchmarking group for
niop
operations in thealu.rs
file. The changes add comprehensive benchmarks for various operations (ADD
,SUB
,MUL
,EXP
,SLL
,XNOR
) across different operand widths (U8
,U16
,U32
)Additions to benchmarking:
niop
benchmarking group was added to evaluate the performance of narrow integer operations (niop
) with different operand widths (U8
,U16
,U32
).niop_bench
macro to simplify the creation of benchmarks for operations likeADD
,SUB
,MUL
,EXP
,SLL
, andXNOR
.