diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-13 22:09:28 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:53 +0800 |
commit | c1138b576524413f8d5755f77aaebd759d6317fc (patch) | |
tree | f237a6de9aea1d41a175a71a90a622312740e8c3 /core/vm/memory_table.go | |
parent | 16122f0041756465198c560d9a486f610efcc787 (diff) | |
download | dexon-c1138b576524413f8d5755f77aaebd759d6317fc.tar dexon-c1138b576524413f8d5755f77aaebd759d6317fc.tar.gz dexon-c1138b576524413f8d5755f77aaebd759d6317fc.tar.bz2 dexon-c1138b576524413f8d5755f77aaebd759d6317fc.tar.lz dexon-c1138b576524413f8d5755f77aaebd759d6317fc.tar.xz dexon-c1138b576524413f8d5755f77aaebd759d6317fc.tar.zst dexon-c1138b576524413f8d5755f77aaebd759d6317fc.zip |
core: vm: Optimize evm (#13)
* core: vm: add an EVM benchmark
* core: vm: optimize stack allocation and instruction for calculating 2^n
* Add DEXONBet bench
Diffstat (limited to 'core/vm/memory_table.go')
-rw-r--r-- | core/vm/memory_table.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/vm/memory_table.go b/core/vm/memory_table.go index bb48e3215..13f15b943 100644 --- a/core/vm/memory_table.go +++ b/core/vm/memory_table.go @@ -43,15 +43,15 @@ func memoryExtCodeCopy(stack *Stack) *big.Int { } func memoryMLoad(stack *Stack) *big.Int { - return calcMemSize(stack.Back(0), big.NewInt(32)) + return calcMemSize(stack.Back(0), big32) } func memoryMStore8(stack *Stack) *big.Int { - return calcMemSize(stack.Back(0), big.NewInt(1)) + return calcMemSize(stack.Back(0), big1) } func memoryMStore(stack *Stack) *big.Int { - return calcMemSize(stack.Back(0), big.NewInt(32)) + return calcMemSize(stack.Back(0), big32) } func memoryCreate(stack *Stack) *big.Int { |