Files
Stephan Renatus 57b2a713a1 genopawasm: only unpack wasm and callgraph bytes once (#3644)
The result will always be the same, and on multiple calls to
rego.New() with the wasm target, repeating this work can be
avoided.

A quick benchmark shows this in action, first main, then this
branch:

    BenchmarkWasmCompilation-16    	     133	   8345008 ns/op	 7521141 B/op	   28041 allocs/op
    BenchmarkWasmCompilation-16    	     256	   4529514 ns/op	 3666712 B/op	   27670 allocs/op

Once Go 1.17 is out and we can do something incompatible with
1.15, we can switch to using the go:embed directive instead.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-07-13 18:03:09 +02:00
..