Skip to content

Compare revmc perf #82

@dajuguan

Description

@dajuguan

Benchmark for go-llvm

git co po_llvm_host
taskset -c 1 go test  -run=^$ -bench=BenchmarkContracts   -v -tags=llvm18

MSTORE/MLOAD with host function

BenchmarkContracts/weth/NoGas             283316              4111 ns/op
BenchmarkContracts/weth/Gas               270841              4235 ns/op
BenchmarkContracts/weth/Section           273950              4124 ns/op
BenchmarkContracts/weth/Interp            681439              1836 ns/op

MSTORE/MLOAD with LLVM

BenchmarkContracts/weth/NoGas             340348              3502 ns/op
BenchmarkContracts/weth/Gas               334497              3520 ns/op
BenchmarkContracts/weth/Section           334764              3466 ns/op
BenchmarkContracts/weth/Interp            693616              1806 ns/op

After caching GetFunctionAddress

BenchmarkContracts/weth/NoGas             436989              2633 ns/op
BenchmarkContracts/weth/Gas               440812              2706 ns/op
BenchmarkContracts/weth/Section           439948              2678 ns/op
BenchmarkContracts/weth/Interp            737246              1853 ns/op

After free memory (very counterintuitive! might be because GC takes up lots of time):

BenchmarkContracts/weth/NoGas             484111              2508 ns/op
BenchmarkContracts/weth/Gas               462482              2497 ns/op
BenchmarkContracts/weth/Section           497572              2529 ns/op
BenchmarkContracts/weth/Interp            687445              1748 ns/op

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions