Skip to content

test_clz_same()

Documentation for tests/benchmark/compute/instruction/test_bitwise.py::test_clz_same@c17999c0.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/benchmark/compute/instruction/test_bitwise.py::test_clz_same --gas-benchmark-values 1

Benchmark CLZ instruction with same input.

Source code in tests/benchmark/compute/instruction/test_bitwise.py
237
238
239
240
241
242
243
244
245
246
247
@pytest.mark.repricing
@pytest.mark.valid_from("Osaka")
def test_clz_same(benchmark_test: BenchmarkTestFiller) -> None:
    """Benchmark CLZ instruction with same input."""
    magic_value = 248  # CLZ(248) = 248
    benchmark_test(
        target_opcode=Op.CLZ,
        code_generator=JumpLoopGenerator(
            setup=Op.PUSH1(magic_value), attack_block=Op.CLZ
        ),
    )

Parametrized Test Cases

This test generates 1 parametrized test case across 2 forks.