Skip to content

test_clz_same()

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

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
203
204
205
206
207
208
209
210
211
212
213
@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.