Skip to content

Commit

Permalink
refactor: make it clear that regular_op_cost uses the multiplier (#4639)
Browse files Browse the repository at this point in the history
The numeric value of the cost stays exactly the same (3856371 is evenly
divisible by 3).

Looking at the recent measurements in

#4455 (comment)

it's clear that the measured cost is 3x lower.

Test Plan:
--------

Just visual inspection that the constant stays the same.
  • Loading branch information
matklad authored and nikurt committed Aug 9, 2021
1 parent 1c27505 commit a6d0d8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/primitives-core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Default for VMConfig {
VMConfig {
ext_costs: ExtCostsConfig::default(),
grow_mem_cost: 1,
regular_op_cost: 3856371,
regular_op_cost: (SAFETY_MULTIPLIER as u32) * 1285457,
limit_config: VMLimitConfig::default(),
}
}
Expand Down

0 comments on commit a6d0d8b

Please sign in to comment.