Skip to content

Commit 52fb0ba

Browse files
committed
add sha256tree to bechmarker
1 parent c676a34 commit 52fb0ba

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tools/src/bin/benchmark-clvm-cost.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fn substitute(args: Placeholder, s: NodePtr) -> OpArgs {
118118
fn time_invocation(a: &mut Allocator, op: u32, arg: OpArgs, flags: u32) -> f64 {
119119
let call = build_call(a, op, arg, 1, None);
120120
//println!("{:x?}", &Node::new(a, call));
121-
let dialect = ChiaDialect::new(0);
121+
let dialect = ChiaDialect::new(0x0200);
122122
let start = Instant::now();
123123
let r = run_program(a, &dialect, call, a.nil(), 11000000000);
124124
if (flags & ALLOW_FAILURE) == 0 {
@@ -378,7 +378,7 @@ pub fn main() {
378378
.unwrap();
379379
let number = quote(&mut a, number);
380380

381-
let ops: [Operator; 19] = [
381+
let ops: [Operator; 20] = [
382382
Operator {
383383
opcode: 60,
384384
name: "modpow (modulus cost)",
@@ -512,6 +512,13 @@ pub fn main() {
512512
extra: None,
513513
flags: NESTING_BASE_COST | PER_ARG_COST | PER_BYTE_COST | LARGE_BUFFERS,
514514
},
515+
Operator {
516+
opcode: 65,
517+
name: "sha256tree (atom)",
518+
arg: Placeholder::SingleArg(Some(g1)),
519+
extra: None,
520+
flags: NESTING_BASE_COST | PER_ARG_COST | PER_BYTE_COST | LARGE_BUFFERS,
521+
},
515522
];
516523

517524
// this "magic" scaling depends on the computer you run the tests on.

0 commit comments

Comments
 (0)